diff options
author | Li Qiang | 2017-04-07 12:48:52 +0200 |
---|---|---|
committer | Greg Kurz | 2017-04-10 09:38:05 +0200 |
commit | 4ffcdef4277a91af15a3c09f7d16af072c29f3f2 (patch) | |
tree | 6df3d5381e3a09b2dbf5edf7ea563f1871c8b000 /hw | |
parent | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (diff) | |
download | qemu-4ffcdef4277a91af15a3c09f7d16af072c29f3f2.tar.gz qemu-4ffcdef4277a91af15a3c09f7d16af072c29f3f2.tar.xz qemu-4ffcdef4277a91af15a3c09f7d16af072c29f3f2.zip |
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')
-rw-r--r-- | hw/9pfs/9p-xattr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/9pfs/9p-xattr.c b/hw/9pfs/9p-xattr.c index eec160b3c2..d05c1a1c1d 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; } |