diff common/listutil.c @ 61:b8cd573bd3ac

Fix check for malloc result, found by cppcheck.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 18 Mar 2014 14:05:17 +0100
parents 3f6378647371
children 4f79cf993737
line wrap: on
line diff
--- a/common/listutil.c	Tue Mar 18 11:28:02 2014 +0000
+++ b/common/listutil.c	Tue Mar 18 14:05:17 2014 +0100
@@ -71,7 +71,7 @@
     }
 
     *data = (char *) malloc( *size + 1 );
-    if (data == NULL) {
+    if (*data == NULL) {
         fclose(f);
         return READ_FILE_NO_MEMORY;
     }

http://wald.intevation.org/projects/trustbridge/