mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
remote: avoid leak on failure
Detected by Coverity. Only possible in OOM situations. * daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak.
This commit is contained in:
parent
0a41733c13
commit
c0e65ae5b2
@ -1453,6 +1453,7 @@ remoteDispatchDomainScreenshot(struct qemud_server *server ATTRIBUTE_UNUSED,
|
|||||||
*mime_p = strdup(mime);
|
*mime_p = strdup(mime);
|
||||||
if (*mime_p == NULL) {
|
if (*mime_p == NULL) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
|
VIR_FREE(mime_p);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user