From: Takashi Iwai Subject: Re: [PATCH 4/8] coverity fix in alsa-libs Date: Thu, 18 Sep 2014 17:26:58 +0200 Message-ID: References: <95.3F.04938.9F0CA145@epcpsbgx1.samsung.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id AA58426555C for ; Thu, 18 Sep 2014 17:26:58 +0200 (CEST) In-Reply-To: <95.3F.04938.9F0CA145@epcpsbgx1.samsung.com> <30445162.99231411039480572.JavaMail.weblogic@epv6ml12> 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: renu.tyagi@samsung.com Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 18 Sep 2014 11:24:41 +0000 (GMT), Renu Tyagi wrote: > > Hi, > Bug Type : Fixing Double free caused by calling snd_hctl_close(hctl) twice as it is called inside snd_mixer_attach_hctl also > File changed : mixer.c > PFA patch4 > ------------------------------------------------------- > From 685fba24eeb639e151f126026130cc631741bcad Mon Sep 17 00:00:00 2001 > From: renu tyagi > Date: Thu, 18 Sep 2014 16:26:45 +0530 > Subject: [PATCH 4/8] [mixer] : Fixing Double free caused by calling snd_hctl_close(hctl) twice as it is called inside snd_mixer_attach_hctl also Please avoid too long subject line. Keep it concise, and put rather the detailed description in the patch changelog text. Takashi > > > Signed-off-by: renu tyagi > --- > src/mixer/mixer.c | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/src/mixer/mixer.c b/src/mixer/mixer.c > index 56e023d..eee9875 100644 > --- a/src/mixer/mixer.c > +++ b/src/mixer/mixer.c > @@ -204,10 +204,8 @@ int snd_mixer_attach(snd_mixer_t *mixer, const char *name) > if (err < 0) > return err; > err = snd_mixer_attach_hctl(mixer, hctl); > - if (err < 0) { > - snd_hctl_close(hctl); > + if (err < 0) > return err; > - } > return 0; > } > > -- > 1.7.1 > > Thanks > Renu Tyagi