summaryrefslogtreecommitdiffstats
path: root/hw/9pfs/virtio-9p-proxy.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2013-07-29 09:03:23 +0200
committerAurelien Jarno <aurelien@aurel32.net>2013-07-29 09:03:23 +0200
commit461bdb3414c40d6806194bf68c91521496b1042d (patch)
tree8351478144c07306f24923791b1e4cd988770513 /hw/9pfs/virtio-9p-proxy.c
parentb6a9f4682e62c686995cc1a1fe2ef4a57a92020b (diff)
parent6c86f405efd6532b58ad1b607cc9f11e856ef5ca (diff)
downloadhqemu-461bdb3414c40d6806194bf68c91521496b1042d.zip
hqemu-461bdb3414c40d6806194bf68c91521496b1042d.tar.gz
Merge branch 'trivial-patches' of git://git.corpit.ru/qemu
* 'trivial-patches' of git://git.corpit.ru/qemu: target-mips: Remove assignment to a variable which is never used misc: Use g_assert_not_reached for code which is expected to be unreachable qemu-options: mention C-a h in the -nographic doc misc: Fix new typos in comments and strings linux-user: correct argument number for sys_mremap and sys_splice PPC: dbdma: macio: Fix format specifiers (build regression) watchdog: Remove break after exit exec: Remove env from list of poisoned names hw/9pfs: Fix potential memory leak and avoid reuse of freed memory timer: make timers_state static aes: Remove unused code (NDEBUG, u16)
Diffstat (limited to 'hw/9pfs/virtio-9p-proxy.c')
-rw-r--r--hw/9pfs/virtio-9p-proxy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
index 8ba2959..5f44bb7 100644
--- a/hw/9pfs/virtio-9p-proxy.c
+++ b/hw/9pfs/virtio-9p-proxy.c
@@ -1153,10 +1153,12 @@ static int proxy_init(FsContext *ctx)
sock_id = atoi(ctx->fs_root);
if (sock_id < 0) {
fprintf(stderr, "socket descriptor not initialized\n");
+ g_free(proxy);
return -1;
}
}
g_free(ctx->fs_root);
+ ctx->fs_root = NULL;
proxy->in_iovec.iov_base = g_malloc(PROXY_MAX_IO_SZ + PROXY_HDR_SZ);
proxy->in_iovec.iov_len = PROXY_MAX_IO_SZ + PROXY_HDR_SZ;
OpenPOWER on IntegriCloud