diff options
author | Matthew Daley <mattjd@gmail.com> | 2013-09-18 15:37:45 +1200 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-09-25 12:49:15 +0100 |
commit | 96c0061c0168de4e322b0b869f9c7f3b907b53ce (patch) | |
tree | 7cc80d79a67abe033ea6b069edfe3300e14e25d0 /tools | |
parent | 2989ef904236c941ed61f587e9ed5e0827e7a81b (diff) | |
download | xen-96c0061c0168de4e322b0b869f9c7f3b907b53ce.tar.gz xen-96c0061c0168de4e322b0b869f9c7f3b907b53ce.tar.bz2 xen-96c0061c0168de4e322b0b869f9c7f3b907b53ce.zip |
libxl: fix out-of-memory check in parse_global_config
Coverity-ID: 1055174
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/xl.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |