summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRenu Tyagi <renu.tyagi@samsung.com>2014-09-23 09:05:27 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-23 09:05:27 +0200
commit09f5c75e9cd7869353a4f6c8da72df43dc2c8e22 (patch)
treeeb77bbb5a2a984a5cdd5b30859ab2cf3b61207e6 /src
parent0ee46280f3e3e52ed2c0af45c9a446a5a9dc5f83 (diff)
downloadalsa-lib-09f5c75e9cd7869353a4f6c8da72df43dc2c8e22.tar.gz
rawmidi: close handle h
Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'src')
-rw-r--r--src/rawmidi/rawmidi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c
index b835b472..ac699b43 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);