]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: fm801: Fix double free in case of error in tuner detection
authorBen Hutchings <ben@decadent.org.uk>
Thu, 22 Sep 2011 13:38:58 +0000 (14:38 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 Sep 2011 13:51:46 +0000 (15:51 +0200)
commit98efa8abc4b0d93d3e850e42af2b8fdef766653b
tree3392535e3ee4970c4dac01784b07c9e0cfe5cf5d
parent2dcd54d1436f26c584e2d88d3fe946c9eb064d1b
ALSA: fm801: Fix double free in case of error in tuner detection

Commit ff14a64ada6fd5fc5d7ca4a1d6d5f96e412722d1
("ALSA: fm801: add error handling if auto-detect fails") added
incorrect error handling.

Once we have successfully called snd_device_new(), the cleanup
function fm801_free() will automatically be called by snd_card_free()
and we must *not* also call fm801_free() directly.

Reported-by: Hor Jiun Shyong <jiunshyong@gmail.com>
References: http://bugs.debian.org/641946
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@kernel.org [v3.0+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/fm801.c