alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 04/11] rawmidi : close handle h
@ 2014-09-23  4:22 Renu Tyagi
  0 siblings, 0 replies; only message in thread
From: Renu Tyagi @ 2014-09-23  4:22 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org; +Cc: tiwai@suse.de


Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
---
 src/rawmidi/rawmidi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

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, &params);
--
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-23  4:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23  4:22 [PATCH v2 04/11] rawmidi : close handle h Renu Tyagi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).