[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] NBD: Avoid leaking a couple of strings when the
From: |
nick |
Subject: |
[Qemu-devel] [PATCH 1/2] NBD: Avoid leaking a couple of strings when the NBD device is closed |
Date: |
Thu, 28 Apr 2011 16:20:01 +0100 |
From: Nick Thomas <address@hidden>
Signed-off-by: Nick Thomas <address@hidden>
---
block/nbd.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index 1d6b225..7a52f62 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);
}
--
1.7.0.4