From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 03 Jan 2017 20:00:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="1078935438" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 03 Jan 2017 20:00:24 -0800 Date: Wed, 4 Jan 2017 12:02:10 +0800 From: Yuanhan Liu To: Yong Wang Cc: dev@dpdk.org 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 Content-Disposition: inline In-Reply-To: <1483502275-18482-1-git-send-email-wang.yong19@zte.com.cn> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix memory leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 04:00:27 -0000 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