From patchwork Tue Sep 23 04:22:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renu Tyagi X-Patchwork-Id: 4952851 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E15D4BEEA5 for ; Tue, 23 Sep 2014 04:23:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AB5F20131 for ; Tue, 23 Sep 2014 04:23:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0E5C3200D5 for ; Tue, 23 Sep 2014 04:23:04 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 03009261B21; Tue, 23 Sep 2014 06:23:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 3F617261ACB; Tue, 23 Sep 2014 06:22:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D68BE261ACB; Tue, 23 Sep 2014 06:22:56 +0200 (CEST) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 884BB262632 for ; Tue, 23 Sep 2014 06:22:23 +0200 (CEST) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCC00EGR6TAKCE0@mailout3.samsung.com> for alsa-devel@alsa-project.org; Tue, 23 Sep 2014 13:22:22 +0900 (KST) Received: from epcpsbgx3.samsung.com ( [172.20.52.126]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 07.07.18484.E75F0245; Tue, 23 Sep 2014 13:22:22 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-99-5420f57e59cb Received: from epmailer01 ( [203.254.219.141]) by epcpsbgx3.samsung.com (EPCPMTA) with SMTP id 74.F6.14702.F65F0245; Tue, 23 Sep 2014 13:22:07 +0900 (KST) Date: Tue, 23 Sep 2014 04:22:07 +0000 (GMT) From: Renu Tyagi To: "alsa-devel@alsa-project.org" MIME-version: 1.0 X-MTR: 20140923042131529@renu.tyagi Msgkey: 20140923042131529@renu.tyagi X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20140919102315849@renu.tyagi X-ParentMTR: 20140919102315849@renu.tyagi X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general MIME-version: 1.0 Message-id: <18246145.61351411446127682.JavaMail.weblogic@epv6ml10> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMIsWRmVeSWpSXmKPExsWyRsSkTrfuq0KIwaYvQhZXLh5icmD02PC5 iS2AMYrLJiU1J7MstUjfLoEr4+DtZUwFCzgr1n3YxtrA+Ieji5GTQ0hAVWLBtWWMILaEgInE 0qZVbBC2mMSFe+uBbC6gmqWMEkfOzWKBKfoypZUFIjGHUWLmwndg3SxAk2bcXM0KYrMJaEns 6exhArGFBZwlXj5uZgaxRQTsJd6fXw22gVlAWWJ9916gOAfQIAWJ3ffMQMK8AoISJ2c+YQEJ SwCVLN2qA2LyCqhI3J8XDXGBnMSSqZeZIGxeiRntT1l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vEH4oSU7ofskPYBhJHFs1hRfUIiO0ssaO/g2UCo+wsJKlZSNpn IWlHVrOAkWUVo2hqQXJBcVJ6hbFecWJucWleul5yfu4mRnAKerZ4B+P/89aHGAU4GJV4eD3W KIQIsSaWFVfmHmKU4GBWEuEtmQgU4k1JrKxKLcqPLyrNSS0+xGgKjLGJzFKiyfnA9JhXEm9o bGJuamxqYWBobm6mJM4bfyspSEggPbEkNTs1tSC1CKaPiYNTqoFRzFjaxT7ogyLnXEG9D7KX qgqffnz36Ej15yVpCS0vS0zLnnfJr/YWcjhjar7XRVn8uoT1Jr6k2rncX+PUnb2tNkxaI3LU 6otays65jEcOOFm9DhOR3sq/ca/H8usTy01WlR/43Ky2fI/mzRoxt5Ty/TIaFzZMKhGbcLo6 bOaB9ifTz7CLtiQqsRRnJBpqMRcVJwIAqp9VV1cDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected Cc: "tiwai@suse.de" Subject: Re: [alsa-devel] [PATCH v2 04/11] rawmidi : close handle h X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: renu.tyagi@samsung.com List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" 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 X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: renu tyagi --- src/rawmidi/rawmidi.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) -- 1.7.1 diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c index b835b47..ac699b4 100644 --- a/src/rawmidi/rawmidi.c +++ b/src/rawmidi/rawmidi.c @@ -256,8 +256,11 @@ static int snd_rawmidi_open_conf(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp snd_config_delete(type_conf); if (err >= 0) err = open_func(inputp, outputp, name, rawmidi_root, rawmidi_conf, mode); - if (err < 0) + if (err < 0) { + if (h) + snd_dlclose(h); return err; + } if (inputp) { (*inputp)->dl_handle = h; h = NULL; snd_rawmidi_params_default(*inputp, ¶ms);