From 996922de45299878cdc4c15b72b19edf2bc618a4 Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Tue, 7 Nov 2017 17:27:23 -0500 Subject: block/curl: fix minor memory leaks Signed-off-by: Jeff Cody Reviewed-by: Richard W.M. Jones Signed-off-by: Jeff Cody --- block/curl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'block') diff --git a/block/curl.c b/block/curl.c index 00a98799b6..35cf417f59 100644 --- a/block/curl.c +++ b/block/curl.c @@ -857,6 +857,9 @@ out_noclean: qemu_mutex_destroy(&s->mutex); g_free(s->cookie); g_free(s->url); + g_free(s->username); + g_free(s->proxyusername); + g_free(s->proxypassword); qemu_opts_del(opts); return -EINVAL; } @@ -955,6 +958,9 @@ static void curl_close(BlockDriverState *bs) g_free(s->cookie); g_free(s->url); + g_free(s->username); + g_free(s->proxyusername); + g_free(s->proxypassword); } static int64_t curl_getlength(BlockDriverState *bs) -- cgit v1.2.3