mixer: fixed double free

Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Renu Tyagi 2014-09-23 09:01:36 +02:00 committed by Takashi Iwai
parent 9ab3c4a669
commit 020bb3018a

View file

@ -204,10 +204,8 @@ int snd_mixer_attach(snd_mixer_t *mixer, const char *name)
if (err < 0) if (err < 0)
return err; return err;
err = snd_mixer_attach_hctl(mixer, hctl); err = snd_mixer_attach_hctl(mixer, hctl);
if (err < 0) { if (err < 0)
snd_hctl_close(hctl);
return err; return err;
}
return 0; return 0;
} }