mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00: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:
parent
4960022a17
commit
3cef9f6adb
@ -520,6 +520,7 @@ virGetStorageVol(virConnectPtr conn, const char *pool, const char *name,
|
|||||||
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
virCheckNonNullArgReturn(pool, NULL);
|
||||||
virCheckNonNullArgReturn(name, NULL);
|
virCheckNonNullArgReturn(name, NULL);
|
||||||
virCheckNonNullArgReturn(key, NULL);
|
virCheckNonNullArgReturn(key, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user