mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-23 14:33:10 +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 ||
|
directoryName == NULL || *directoryName != NULL ||
|
||||||
fileName == NULL || *fileName != NULL) {
|
fileName == NULL || *fileName != NULL) {
|
||||||
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR, "Invalid argument");
|
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR, "Invalid argument");
|
||||||
goto failure;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user