Fix reference leak in remoteDispatchStorageVolCreateXmlFrom

This commit is contained in:
Matthias Bolte 2009-12-11 00:56:04 +01:00
parent 27ba0ad905
commit e2692e25de
1 changed files with 3 additions and 0 deletions
daemon

View File

@ -4118,12 +4118,15 @@ remoteDispatchStorageVolCreateXmlFrom (struct qemud_server *server ATTRIBUTE_UNU
clonevol = get_nonnull_storage_vol (conn, args->clonevol);
if (clonevol == NULL) {
virStoragePoolFree(pool);
remoteDispatchConnError(rerr, conn);
return -1;
}
newvol = virStorageVolCreateXMLFrom (pool, args->xml, clonevol,
args->flags);
virStorageVolFree(clonevol);
virStoragePoolFree(pool);
if (newvol == NULL) {
remoteDispatchConnError(rerr, conn);
return -1;