From: Greg Kurz <groug@kaod.org>
To: Li Qiang <liq3ea@gmail.com>
Cc: qemu-devel@nongnu.org, ppandit@redhat.com, Li Qiang <liqiang6-s@360.cn>
Subject: Re: [Qemu-devel] [PATCH] 9pfs: xattr: fix memory leak in v9fs_list_xattr
Date: Mon, 10 Apr 2017 11:14:25 +0200 [thread overview]
Message-ID: <20170410111425.634d7284@bahia.lan> (raw)
In-Reply-To: <1491562132-69066-1-git-send-email-liqiang6-s@360.cn>
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
On Fri, 7 Apr 2017 03:48:52 -0700
Li Qiang <liq3ea@gmail.com> wrote:
> Free 'orig_value' in error path.
>
> Signed-off-by: Li Qiang <liqiang6-s@360.cn>
> ---
Good catch. I'll send a pull req later today.
Cheers.
--
Greg
> hw/9pfs/9p-xattr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2017-04-10 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 10:48 [Qemu-devel] [PATCH] 9pfs: xattr: fix memory leak in v9fs_list_xattr Li Qiang
2017-04-10 9:14 ` Greg Kurz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170410111425.634d7284@bahia.lan \
--to=groug@kaod.org \
--cc=liq3ea@gmail.com \
--cc=liqiang6-s@360.cn \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).