mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
rawmidi: close handle h
Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
0ee46280f3
commit
09f5c75e9c
1 changed files with 4 additions and 1 deletions
|
|
@ -256,8 +256,11 @@ static int snd_rawmidi_open_conf(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp
|
||||||
snd_config_delete(type_conf);
|
snd_config_delete(type_conf);
|
||||||
if (err >= 0)
|
if (err >= 0)
|
||||||
err = open_func(inputp, outputp, name, rawmidi_root, rawmidi_conf, mode);
|
err = open_func(inputp, outputp, name, rawmidi_root, rawmidi_conf, mode);
|
||||||
if (err < 0)
|
if (err < 0) {
|
||||||
|
if (h)
|
||||||
|
snd_dlclose(h);
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
if (inputp) {
|
if (inputp) {
|
||||||
(*inputp)->dl_handle = h; h = NULL;
|
(*inputp)->dl_handle = h; h = NULL;
|
||||||
snd_rawmidi_params_default(*inputp, ¶ms);
|
snd_rawmidi_params_default(*inputp, ¶ms);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue