aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2017-11-07 17:27:23 -0500
committerJeff Cody <jcody@redhat.com>2017-12-18 15:44:39 -0500
commit996922de45299878cdc4c15b72b19edf2bc618a4 (patch)
treec408bd6a9c5ffbab37c4362494bef980d8b5ba96 /block
parent2d25964d1831c99d54981e8b615eba5dd6a63e36 (diff)
block/curl: fix minor memory leaks
Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/curl.c6
1 files changed, 6 insertions, 0 deletions
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)