From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Daley Subject: [PATCH 09/28] libxl: fix out-of-memory check in parse_global_config Date: Wed, 18 Sep 2013 15:37:45 +1200 Message-ID: <1379475484-25993-10-git-send-email-mattjd@gmail.com> References: <1379475484-25993-1-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379475484-25993-1-git-send-email-mattjd@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Matthew Daley , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Coverity-ID: 1055174 Signed-off-by: Matthew Daley --- tools/libxl/xl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index b965cab..657610b 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); } -- 1.7.10.4