[dpdk-dev] 答复: Re: [PATCH] lib/librte_vhost: fix memory leak

wang.yong19 at zte.com.cn wang.yong19 at zte.com.cn
Wed Jan 4 07:55:34 CET 2017


> Yuanhan Liu <yuanhan.liu at linux.intel.com> 
> 2017/01/04 12:02
> 
> to
> 
> Yong Wang <wang.yong19 at zte.com.cn>, 
> 
> cc
> 
> dev at dpdk.org
> 
> subject
> 
> Re: [PATCH] lib/librte_vhost: fix memory leak
> 
> On Tue, Jan 03, 2017 at 10:57:55PM -0500, Yong Wang wrote:
> > In function vhost_new_device(), current code dose not free 'dev'
> > in "i == MAX_VHOST_DEVICE" condition statements. It will lead to a
> > memory leak.
> 
> Nice catch!
> 
> Here are few minor stuff you might need pay attention to for future
> contribution:
> 
> - a fix patch needs a fixline, like following
> 
>   Fixes: 45ca9c6f7bc6 ("vhost: get rid of linked list for devices")
> 
> - the prefix for vhost lib is "vhost: ". And FYI, for PMD drivers, it's
>   'net/PMD_NAME', say 'net/virtio'.
> 
> 
> For you convenience, I have fixed the two while applying. And thanks
> for the fix.
> 
> Applied to dpdk-next-virtio.
> 
>    --yliu

Thanks for your advice. 



More information about the dev mailing list