]> git.proxmox.com Git - mirror_qemu.git/commitdiff
NBD: Avoid leaking a couple of strings when the NBD device is closed
authorNick Thomas <nick@bytemark.co.uk>
Thu, 28 Apr 2011 15:20:01 +0000 (16:20 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 3 May 2011 09:29:21 +0000 (11:29 +0200)
Signed-off-by: Nick Thomas <nick@bytemark.co.uk>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/nbd.c

index 1d6b22561bea3079e68428879ebff7e043366f6c..7a52f62e7e1fb0e0af949b6ec3590b78d421ed1d 100644 (file)
@@ -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);
 }