From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id F2242C304 for ; Sun, 29 Jan 2017 23:35:41 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id c85so190466357wmi.1 for ; Sun, 29 Jan 2017 14:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=pgEDcF9wAUwiC8hNcbcP7egeGZhvgEE4X41DMYs8kv8=; b=n3+bxf/4U1AaRBBo8/YO3jM3Cj/4cfbUpT3T8zS7+ZThZWOO9vi2yNhHlap1cNNiGg diALnSQkhWuDk08/6kz5h5NDHlcWPC7mTgmpKw9pjVVCO3DqxxLcZZ/oCtvWf8k/SmZn Y3/BtvChr++mV9dOYbsIGy9F9/j01piCAK/slgSG7uxHG81aOMiZXr2fEquXcxqwIVHA JiNCT052X/n8iZ1pFt9GN9SibUePIV3QzUN+JTKzAcg7+cTXqr516JxDykSDKCzOOwxW JACeMwSCu+cA0ylpSN+KOUwMtNaXPq1HXCCZOLPv3HMY41LP8J1rfn1EW6fpztxQ0Nwq EDqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=pgEDcF9wAUwiC8hNcbcP7egeGZhvgEE4X41DMYs8kv8=; b=BOGw6hDZbM+ZwO1Bn0c+7Jh+mPmDmNsOe/bNkw6DNLDUlMqha4Ve1ljHRUBlPC7LtQ lDanaaDmgEwPcMXeN9esB2Wr2y6vThdalQrLCNcTj6/idO6gj3F13nfIVBHqiaOF6gl7 dQZsvN0QWu3biZLuTGZHGZpUgvdTqizXBK/dNOE39nj1xHkN3ur+MG20nEdEXlOw5HKZ iTEfsoPwYw41ctKInwx930pKyoOyRh2j8KkfbUSm7bBGTLzGbpMWSORnwF2nbAEQ95hD MKaS8OctzIdSc4Jepqwx1fKUDMhqgF8vxcxhtbVnA07qZk3s3SArp7pr1PJMNRv0UNM+ fU4g== X-Gm-Message-State: AIkVDXL8aUK+GW6Hpoj9OLJULiKEkzTWW6+8KoXUJLi9nk1PFodh8wRJAak74CRKT1t273D1 X-Received: by 10.28.103.3 with SMTP id b3mr10687268wmc.99.1485729341680; Sun, 29 Jan 2017 14:35:41 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id o42sm19719579wrb.18.2017.01.29.14.35.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Jan 2017 14:35:40 -0800 (PST) From: Thomas Monjalon To: Emmanuel Roullit Cc: dev@dpdk.org, stable@dpdk.org Date: Sun, 29 Jan 2017 23:35:39 +0100 Message-ID: <2487536.DRxuiboR0Q@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20170124202656.792-1-emmanuel.roullit@gmail.com> References: <20170124202656.792-1-emmanuel.roullit@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] eal: reset driver name pointer on failure X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2017 22:35:42 -0000 2017-01-24 21:26, Emmanuel Roullit: > The pointer set by strdup() needs to be cleared on failure to avoid a > potential double-free from the caller. > > Found with clang static analysis: > lib/librte_eal/common/eal_common_devargs.c:123:2: > warning: Attempt to free released memory > free(buf); > ^~~~~~~~~ > > Fixes: 3fe2e5fec82b ("eal: fix argument parsing check") The real bug origin is: Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit") > Signed-off-by: Emmanuel Roullit Applied, thanks