mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
daemon: Avoid resetting errors before they are reported
Commit f44bfb7
was supposed to make sure no additional libvirt API (esp.
*Free) is called before remoteDispatchConnError() is called on error.
However, the patch missed two instances.
This commit is contained in:
parent
9ed545185f
commit
55cc591fc1
@ -5108,12 +5108,13 @@ remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUS
|
|||||||
ret->names.names_len =
|
ret->names.names_len =
|
||||||
virStoragePoolListVolumes (pool,
|
virStoragePoolListVolumes (pool,
|
||||||
ret->names.names_val, args->maxnames);
|
ret->names.names_val, args->maxnames);
|
||||||
virStoragePoolFree(pool);
|
|
||||||
if (ret->names.names_len == -1) {
|
if (ret->names.names_len == -1) {
|
||||||
VIR_FREE(ret->names.names_val);
|
VIR_FREE(ret->names.names_val);
|
||||||
remoteDispatchConnError(rerr, conn);
|
remoteDispatchConnError(rerr, conn);
|
||||||
|
virStoragePoolFree(pool);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
virStoragePoolFree(pool);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -5137,11 +5138,12 @@ remoteDispatchStoragePoolNumOfVolumes (struct qemud_server *server ATTRIBUTE_UNU
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret->num = virStoragePoolNumOfVolumes (pool);
|
ret->num = virStoragePoolNumOfVolumes (pool);
|
||||||
virStoragePoolFree(pool);
|
|
||||||
if (ret->num == -1) {
|
if (ret->num == -1) {
|
||||||
remoteDispatchConnError(rerr, conn);
|
remoteDispatchConnError(rerr, conn);
|
||||||
|
virStoragePoolFree(pool);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
virStoragePoolFree(pool);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user