From: Takashi Iwai Subject: Re: coverity fix in alsa-libs Date: Wed, 17 Sep 2014 07:52:59 +0200 Message-ID: References: <0A.06.05230.43DF8145@epcpsbgx3.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 B40BD2651CB for ; Wed, 17 Sep 2014 07:53:00 +0200 (CEST) In-Reply-To: <0A.06.05230.43DF8145@epcpsbgx3.samsung.com> 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 Wed, 17 Sep 2014 03:17:08 +0000 (GMT), Renu Tyagi wrote: > > Hi Takashi, > File in which changes are being made : rawmidi.c > Bug type - Handle h to be closed in case of error before returning > PFA patch. By some reason, your post doesn't appear on alsa-devel ML. Did you subscribe the ML? If not, please subscribe and repost. Also, what about other patches you made? Last but not least: please prepare a patch to be applicable via git-am, including subject and from tags and the changelog content, and don't forget your sign-off to the patch, just like a patch to Linux kernel. thanks, Takashi > > Community Code: > if (err >= 0) > err = open_func(inputp, outputp, name, rawmidi_root, rawmidi_conf, mode); > if (err < 0) > return err; > if (inputp) { > (*inputp)->dl_handle = h; h = NULL; > > Recommended Code : > if (err >= 0) > err = open_func(inputp, outputp, name, rawmidi_root, rawmidi_conf, mode); > if (err < 0){ > if (h) > snd_dlclose(h); > return err; > } > if (inputp) { > (*inputp)->dl_handle = h; h = NULL; > > > Thanks & Regards, > Renu Tyagi > [2 22578.patch ] >