From fa479727ff42e26a4b1b9af1dab84df5737c2030 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 15 Dec 2009 19:08:49 +0100 Subject: [PATCH] esx_util.c: avoid NULL deref for invalid inputs * src/esx/esx_util.c (esxUtil_ParseDatastoreRelatedPath): Return right away for invalid inputs, rather than using them (which would dereference NULL pointers) in clean-up code. --- src/esx/esx_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 3e539217b1..35a48e0898 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -277,7 +277,7 @@ esxUtil_ParseDatastoreRelatedPath(virConnectPtr conn, directoryName == NULL || *directoryName != NULL || fileName == NULL || *fileName != NULL) { ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR, "Invalid argument"); - goto failure; + return -1; } /*