From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: dev@dpdk.org
Cc: John McNamara <john.mcnamara@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: fix use after free issue
Date: Fri, 21 Oct 2016 15:52:27 +0800 [thread overview]
Message-ID: <20161021075227.GS16751@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1476801486-4618-1-git-send-email-yuanhan.liu@linux.intel.com>
On Tue, Oct 18, 2016 at 10:38:06PM +0800, Yuanhan Liu wrote:
> Fix the coverity USE_AFTER_FREE issue.
>
> Fixes: a277c7159876 ("vhost: refactor code structure")
> Coverity issue: 137884
>
> Reported-by: John McNamara <john.mcnamara@intel.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Applied to dpdk-next-virtio.
--yliu
> ---
> lib/librte_vhost/socket.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
> index 967cb65..aaa9c27 100644
> --- a/lib/librte_vhost/socket.c
> +++ b/lib/librte_vhost/socket.c
> @@ -250,8 +250,8 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
> vsocket->connfd = -1;
> close(connfd);
> *remove = 1;
> - free(conn);
> vhost_destroy_device(conn->vid);
> + free(conn);
>
> if (vsocket->reconnect)
> vhost_user_create_client(vsocket);
> --
> 1.9.0
prev parent reply other threads:[~2016-10-21 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 14:38 Yuanhan Liu
2016-10-21 7:52 ` Yuanhan Liu [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=20161021075227.GS16751@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
/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).