diff --git a/daemon/remote.c b/daemon/remote.c index 31176153eebde99fde45cb6cd32295cf96fc1d48..7a43046bacaf30a59b5f99848c4c0dbfa3621dac 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -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;