remote: avoid leak on failure

Detected by Coverity.  Only possible in OOM situations.

* daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak.
This commit is contained in:
Eric Blake 2011-06-02 16:42:45 -06:00
parent 0a41733c13
commit c0e65ae5b2

View File

@ -1453,6 +1453,7 @@ remoteDispatchDomainScreenshot(struct qemud_server *server ATTRIBUTE_UNUSED,
*mime_p = strdup(mime);
if (*mime_p == NULL) {
virReportOOMError();
VIR_FREE(mime_p);
goto cleanup;
}