svn commit: r298240 - head/sbin/restore
Marcelo Araujo
araujo at FreeBSD.org
Tue Apr 19 02:00:50 UTC 2016
Author: araujo
Date: Tue Apr 19 02:00:48 2016
New Revision: 298240
URL: https://svnweb.freebsd.org/changeset/base/298240
Log:
malloc will return NULL if it cannot allocate memory.
MFC after: 2 weeks.
Modified:
head/sbin/restore/dirs.c
Modified: head/sbin/restore/dirs.c
==============================================================================
--- head/sbin/restore/dirs.c Tue Apr 19 01:59:26 2016 (r298239)
+++ head/sbin/restore/dirs.c Tue Apr 19 02:00:48 2016 (r298240)
@@ -598,7 +598,7 @@ setdirmodes(int flags)
if (bufsize < node.extsize) {
if (bufsize > 0)
free(buf);
- if ((buf = malloc(node.extsize)) != 0) {
+ if ((buf = malloc(node.extsize)) != NULL) {
bufsize = node.extsize;
} else {
bufsize = 0;
More information about the svn-src-head
mailing list