From e63ce3de7f6e7134d31ad419b914aa5596216be4 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Tue, 19 Apr 2016 02:00:48 +0000 Subject: [PATCH] malloc will return NULL if it cannot allocate memory. MFC after: 2 weeks. --- sbin/restore/dirs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index 7b308cd02415..8716de928dae 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -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;