aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs
diff options
context:
space:
mode:
authorLi Qiang <liq3ea@gmail.com>2017-04-07 03:48:52 -0700
committerGreg Kurz <groug@kaod.org>2017-04-10 09:38:05 +0200
commit4ffcdef4277a91af15a3c09f7d16af072c29f3f2 (patch)
tree6df3d5381e3a09b2dbf5edf7ea563f1871c8b000 /hw/9pfs
parent5daf9b3025baef10ee7b77daa003d5696b58d5dc (diff)
downloadqemu-4ffcdef4277a91af15a3c09f7d16af072c29f3f2.zip
qemu-4ffcdef4277a91af15a3c09f7d16af072c29f3f2.tar.gz
qemu-4ffcdef4277a91af15a3c09f7d16af072c29f3f2.tar.bz2
9pfs: xattr: fix memory leak in v9fs_list_xattr
Free 'orig_value' in error path. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'hw/9pfs')
-rw-r--r--hw/9pfs/9p-xattr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/9pfs/9p-xattr.c b/hw/9pfs/9p-xattr.c
index eec160b..d05c1a1 100644
--- a/hw/9pfs/9p-xattr.c
+++ b/hw/9pfs/9p-xattr.c
@@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
}