From: Michal Privoznik Date: Fri, 10 May 2013 10:05:28 +0000 (+0200) Subject: virGetStorageVol: Don't ignore NULL pool name X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3cef9f6adbdcea67cf8c134381345d82909b75c5;p=libvirt.git 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. --- diff --git a/src/datatypes.c b/src/datatypes.c index f815b6c861..884eb3e954 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -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);