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>
This commit is contained in:
Nick Thomas 2011-04-28 16:20:01 +01:00 committed by Kevin Wolf
parent 2ab3cb8c0a
commit d2d979c628
1 changed files with 4 additions and 0 deletions

View 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);
}