diff options
author | Li Qiang <liq3ea@gmail.com> | 2017-04-07 03:48:52 -0700 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2017-04-10 09:38:05 +0200 |
commit | 4ffcdef4277a91af15a3c09f7d16af072c29f3f2 (patch) | |
tree | 6df3d5381e3a09b2dbf5edf7ea563f1871c8b000 /hw | |
parent | 5daf9b3025baef10ee7b77daa003d5696b58d5dc (diff) |
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; } |