From 96c0061c0168de4e322b0b869f9c7f3b907b53ce Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Wed, 18 Sep 2013 15:37:45 +1200 Subject: libxl: fix out-of-memory check in parse_global_config Coverity-ID: 1055174 Signed-off-by: Matthew Daley Acked-by: Ian Campbell --- tools/libxl/xl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index b965cabf07..657610ba36 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -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); } -- cgit v1.2.3