mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virGetStorageVol: Don't ignore NULL pool name
The function takes pool name as argument. However, it is not acceptable for it to be NULL. Hence, we should check it and report error in case it is.
This commit is contained in:
@@ -520,6 +520,7 @@ virGetStorageVol(virConnectPtr conn, const char *pool, const char *name,
|
||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||
return NULL;
|
||||
}
|
||||
virCheckNonNullArgReturn(pool, NULL);
|
||||
virCheckNonNullArgReturn(name, NULL);
|
||||
virCheckNonNullArgReturn(key, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user