mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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.
This commit is contained in:
parent
576b2c7514
commit
fa479727ff
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user