]> git.proxmox.com Git - qemu.git/commit
hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
authorStefan Weil <sw@weilnetz.de>
Sun, 16 Jun 2013 10:14:36 +0000 (12:14 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 27 Jul 2013 07:22:54 +0000 (11:22 +0400)
commit80cba1b71eb9a75404d1effddec8ffa9f0d6d6fb
tree87bfc77e1e1da2773a83a0605fcd595639209cbc
parentd9cd4007d5c7e877a006392eeafb2291f06d6685
hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

The leak was reported by cppcheck.

Function proxy_init also calls g_free for ctx->fs_root.
Avoid reuse of this memory by setting ctx->fs_root to NULL.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/9pfs/virtio-9p-proxy.c