]> Git Repo - qemu.git/commitdiff
9pfs: xattr: fix memory leak in v9fs_list_xattr
authorLi Qiang <[email protected]>
Fri, 7 Apr 2017 10:48:52 +0000 (03:48 -0700)
committerGreg Kurz <[email protected]>
Mon, 10 Apr 2017 07:38:05 +0000 (09:38 +0200)
Free 'orig_value' in error path.

Signed-off-by: Li Qiang <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
hw/9pfs/9p-xattr.c

index eec160b3c2ac0dce27c92237d50f746ca2d284fe..d05c1a1c1df50629c6d25afaaf96cec71e5928a9 100644 (file)
@@ -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;
     }
 
This page took 0.025465 seconds and 4 git commands to generate.