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>
This commit is contained in:
Li Qiang 2017-04-07 03:48:52 -07:00 committed by Greg Kurz
parent 5daf9b3025
commit 4ffcdef427

View 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;
}