changeset 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 6acb1dae6185
children aa707f111e89
files common/listutil.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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/