From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guneshwor Singh Subject: [PATCH] ALSA: hda - Fix memory leak on snd_hdac_device_init error Date: Thu, 9 Nov 2017 08:57:51 +0530 Message-ID: <20171109032751.20573-1-guneshwor.o.singh@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by alsa0.perex.cz (Postfix) with ESMTP id CB7E8266F1C for ; Thu, 9 Nov 2017 04:27:57 +0100 (CET) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: ALSA ML , Takashi Iwai Cc: Vinod Koul , Guneshwor Singh , Liam Girdwood , Patches Audio , Mark Brown , "Subhransu S. Prusty" List-Id: alsa-devel@alsa-project.org From: "Subhransu S. Prusty" Free codec vendor name on snd_hdac_device_init error. Signed-off-by: Subhransu S. Prusty Signed-off-by: Guneshwor Singh --- sound/hda/hdac_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c index 19deb306facb..467b949544e2 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/hdac_device.c @@ -111,6 +111,8 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, return 0; error: + kfree(codec->vendor_name); + put_device(&codec->dev); return err; } -- 2.15.0