summaryrefslogtreecommitdiff
path: root/block/nbd.c
diff options
context:
space:
mode:
authorNick Thomas <nick@bytemark.co.uk>2011-04-28 16:20:01 +0100
committerKevin Wolf <kwolf@redhat.com>2011-05-03 11:29:21 +0200
commitd2d979c628e4b2c4a3cb71a31841875795c79043 (patch)
treea8bf51abb05b9471392db02846e875493be8c750 /block/nbd.c
parent2ab3cb8c0ae79c96f38f6bfd35620cc18ddba19f (diff)
NBD: Avoid leaking a couple of strings when the NBD device is closed
Signed-off-by: Nick Thomas <nick@bytemark.co.uk> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/nbd.c')
-rw-r--r--block/nbd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/nbd.c b/block/nbd.c
index 1d6b22561b..7a52f62e7e 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -239,6 +239,10 @@ static int nbd_write(BlockDriverState *bs, int64_t sector_num,
static void nbd_close(BlockDriverState *bs)
{
+ BDRVNBDState *s = bs->opaque;
+ qemu_free(s->export_name);
+ qemu_free(s->host_spec);
+
nbd_teardown_connection(bs);
}