qemu: Avoid leaking uri in qemuMigrationPrepareDirect

This commit is contained in:
Jiri Denemark 2013-06-18 13:38:55 +02:00
parent 9da7b11bcd
commit ddf8ad82eb

View File

@ -2384,7 +2384,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
const char *p; const char *p;
char *uri_str = NULL; char *uri_str = NULL;
int ret = -1; int ret = -1;
virURIPtr uri; virURIPtr uri = NULL;
VIR_DEBUG("driver=%p, dconn=%p, cookiein=%s, cookieinlen=%d, " VIR_DEBUG("driver=%p, dconn=%p, cookiein=%s, cookieinlen=%d, "
"cookieout=%p, cookieoutlen=%p, uri_in=%s, uri_out=%p, " "cookieout=%p, cookieoutlen=%p, uri_in=%s, uri_out=%p, "
@ -2489,6 +2489,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
cookieout, cookieoutlen, def, cookieout, cookieoutlen, def,
NULL, this_port, flags); NULL, this_port, flags);
cleanup: cleanup:
virURIFree(uri);
VIR_FREE(hostname); VIR_FREE(hostname);
if (ret != 0) if (ret != 0)
VIR_FREE(*uri_out); VIR_FREE(*uri_out);