Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1937957ybl; Sun, 18 Aug 2019 14:15:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+MBnoXfQGWgu7X5uuhcfWMv4NpYBhsJ/QMDJiAwa7y2H4WgdlWHPU42HBC48do4DzZ9Kp X-Received: by 2002:a17:90a:bd0b:: with SMTP id y11mr16787483pjr.141.1566162937543; Sun, 18 Aug 2019 14:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566162937; cv=none; d=google.com; s=arc-20160816; b=doxFagP8TeC6aYDeEZfuYMrl2u+Zl9sgFqAmve9FUiX4s/FnFwbQBBHxA0rPyJ/bb2 S38NSM9Ut91ETvr3tXUjNa01zfuUh1BYXhTUR4nv1dbbhD6xa9FRHSAw3EckWzqLky6a kprXmOiV1qvBWMS3ogOTrb0wleYH+VW9WzRoj3sfQqhRPLd6W3u8ymRxfMa9LgHcVz3J CVKD4GwKXtYwPQqQRiZ8/BFfo8AaAZ25GAV5bz9kqfoW84+O9JYeOtSZkdBwy3oYUIgU ByQONQD6wHa8o2LCAD4fxHWtiZYfzdo0mg4mvZyklQ14HUVMWJFyF40ViVPMFIRkLgwI UpXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=yEJ5jEDhYhZuMtCJqRENtmEmASDw2JVrUEKLYMJ9raY=; b=weSXuaxeV9sKoarvC6TohX8vTUdu8sxRGi2hBU3xNODh5rXrA2aM5SqaOKLCLYbH+O MI2BB1syNDSSNckTzUWow2uwkxUUeQ1uA9Rkg72dc4fxyJZRI1rsfzKknyOP9MaEsdd7 mO03em8JTCAQS0UN2jRCNQ1ztxnOdiZZhdNCqPSPL/vYrBzUKDx3kM5XXAXa3Lf9pBvA z//rnutBc6ERYix4oCNog2hFN0/dAV6mkO7PGSCqsa+iDVPLD/c7pSaBwXfXkkCmfZrh E4lL0BTuGVBz93+YUuUEyi6wNRw2v8MywOQnMyRAmB4wu1SbCgTbiT5f+HYlI6yPFIYa leTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z190si8332357pgd.303.2019.08.18.14.14.50; Sun, 18 Aug 2019 14:15:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbfHRVMA (ORCPT + 99 others); Sun, 18 Aug 2019 17:12:00 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:49234 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbfHRVL7 (ORCPT ); Sun, 18 Aug 2019 17:11:59 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4311B145EE9CF; Sun, 18 Aug 2019 14:11:59 -0700 (PDT) Date: Sun, 18 Aug 2019 14:11:58 -0700 (PDT) Message-Id: <20190818.141158.218871786116375619.davem@davemloft.net> To: wenwen@cs.uga.edu Cc: inaky.perez-gonzalez@intel.com, linux-wimax@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] wimax/i2400m: fix a memory leak bug From: David Miller In-Reply-To: <1565900991-3573-1-git-send-email-wenwen@cs.uga.edu> References: <1565900991-3573-1-git-send-email-wenwen@cs.uga.edu> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 18 Aug 2019 14:11:59 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wenwen Wang Date: Thu, 15 Aug 2019 15:29:51 -0500 > In i2400m_barker_db_init(), 'options_orig' is allocated through kstrdup() > to hold the original command line options. Then, the options are parsed. > However, if an error occurs during the parsing process, 'options_orig' is > not deallocated, leading to a memory leak bug. To fix this issue, free > 'options_orig' before returning the error. > > Signed-off-by: Wenwen Wang Applied, but... looking at the rest of this file I hope nobody is actually running this code.