From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] lib/librte_vhost: fix memory leak Date: Wed, 4 Jan 2017 12:02:10 +0800 Message-ID: <20170104040210.GE21228@yliu-dev.sh.intel.com> References: <1483502275-18482-1-git-send-email-wang.yong19@zte.com.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Yong Wang Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 977C5F60C for ; Wed, 4 Jan 2017 05:00:26 +0100 (CET) Content-Disposition: inline In-Reply-To: <1483502275-18482-1-git-send-email-wang.yong19@zte.com.cn> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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