From patchwork Fri Sep 19 10:23:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Renu Tyagi X-Patchwork-Id: 4936861 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 49107BEEA5 for ; Fri, 19 Sep 2014 10:24:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85046201ED for ; Fri, 19 Sep 2014 10:24:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8DD4320138 for ; Fri, 19 Sep 2014 10:24:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 64362261A74; Fri, 19 Sep 2014 12:24:23 +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, MIME_BASE64_BLANKS, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 19F64261A0E; Fri, 19 Sep 2014 12:24:12 +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 1BD31261A18; Fri, 19 Sep 2014 12:24:11 +0200 (CEST) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id BC940261B1B for ; Fri, 19 Sep 2014 12:23:41 +0200 (CEST) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NC500EVV8VGHY50@mailout2.samsung.com> for alsa-devel@alsa-project.org; Fri, 19 Sep 2014 19:23:40 +0900 (KST) Received: from epcpsbgx3.samsung.com ( [172.20.52.123]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 01.69.04467.C240C145; Fri, 19 Sep 2014 19:23:40 +0900 (KST) X-AuditID: cbfee68f-f797f6d000001173-f1-541c042cc9ff Received: from epmailer01 ( [203.254.219.141]) by epcpsbgx3.samsung.com (EPCPMTA) with SMTP id 59.55.05230.8240C145; Fri, 19 Sep 2014 19:23:36 +0900 (KST) Message-id: <59.55.05230.8240C145@epcpsbgx3.samsung.com> Date: Fri, 19 Sep 2014 10:23:36 +0000 (GMT) From: Renu Tyagi To: "alsa-devel@alsa-project.org" MIME-version: 1.0 X-MTR: 20140919102315849@renu.tyagi Msgkey: 20140919102315849@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: X-ArchiveUser: X-CPGSPASS: N Content-type: multipart/mixed; boundary="----=SAMSUNG_mySingle_MIME_MULTIPART_BOUNDARY" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsWyRsSkWleHRSbE4O5nAYsrFw8xOTB6bPjc xBbAGMVlk5Kak1mWWqRvl8CVcePaaaaCbSIVt/ofMjUwnhHuYuTkEBJQlVhwbRkjiC0hYCJx cFsDG4QtJnHh3nogmwuoZimjxPQPu1hhij413GWESMxhlGhqbGMHSfAKWEisuvCVCcRmAZq6 408n2FQ2AS2JPZ09QHEODmEBPYmXR8JAwiIC9hLvz68GW8YsoCyxvnsvM0iJkICCxO57ZhAT BSVOznzCArFWWWLfz7lsEHEViY6t05gg4nISS6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s4vcez2DqheAYmpZw4ygpwgIaAh8eKxIESYT2LN wrcsMOW7Ti1nhll1f8tcJojrIyXurHjGPoFRahaSq2chSUHYihJTuh9C2QYSRxbNYUVXzyvg LPFl019miBo7iXW3ZjFj6rWW+Hz6BOsCRs5VjKKpBckFxUnpFcZ6xYm5xaV56XrJ+bmbGMFJ 69niHYz/z1sfYhTgYFTi4fVIkw4RYk0sK67MPcSoAjTn0YbVFxilWPLy81KVRHgv/gNK86Yk VlalFuXHF5XmpBYfYjQFRuVEZinR5Hxgos0riTc0NjE3NTa1MDA0NzdTEueNv5UUJCSQnliS mp2aWpBaBNPHxMEp1cCYvCA8VP4I6+OA3Mc/Z28L+vFFyeNusqL0UdFOTc4NbifqTHylJhv3 nHiekPO2umxN9oMFKzf+amjV45C4tvHR2f3sd2ZOes66e986jqrjUjMzNmwqsJe7cv3VDduA Uo5n/NKPNTaruPTnsWntXt/hovIgLPFfnMjpnBdTZV4tOHolvm5Vxt8dSizFGYmGWsxFxYkA FHZEcnwDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected Cc: "tiwai@suse.de" Subject: [alsa-devel] [PATCH 4/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);