]> git.alsa-project.org Git - alsa-lib.git/commitdiff
mixer: fixed double free
authorRenu Tyagi <renu.tyagi@samsung.com>
Tue, 23 Sep 2014 07:01:36 +0000 (09:01 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 23 Sep 2014 07:01:36 +0000 (09:01 +0200)
Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/mixer/mixer.c

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