]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: fix out-of-memory check in parse_global_config
authorMatthew Daley <mattjd@gmail.com>
Wed, 18 Sep 2013 03:37:45 +0000 (15:37 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 25 Sep 2013 11:49:15 +0000 (12:49 +0100)
Coverity-ID: 1055174
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/xl.c

index b965cabf07e67c2298fe10f5c1d0c2c29a5b88bf..657610ba36efdb9148c20507bc067e309a81f99d 100644 (file)
@@ -117,8 +117,8 @@ static void parse_global_config(const char *configfile,
         lockfile = strdup(XL_LOCK_FILE);
     }
 
-    if (!lockfile < 0) {
-        fprintf(stderr, "failed to allocate lockdir \n");
+    if (!lockfile) {
+        fprintf(stderr, "failed to allocate lockdir\n");
         exit(1);
     }