Skip to content

Commit 40e2596

Browse files
takaswiegregkh
authored andcommitted
ALSA: firewire-tascam: fix memory leak of private data
commit 8d28277 upstream. Although private data of sound card instance is usually allocated in the tail of the instance, drivers in ALSA firewire stack allocate the private data before allocating the instance. In this case, the private data should be released explicitly at .private_free callback of the instance. This commit fixes memory leak following to the above design. Fixes: b610386 ('ALSA: firewire-tascam: deleyed registration of sound card') Cc: <stable@vger.kernel.org> # v4.7+ Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 933f20a commit 40e2596

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/firewire/tascam/tascam.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static void tscm_free(struct snd_tscm *tscm)
9393
fw_unit_put(tscm->unit);
9494

9595
mutex_destroy(&tscm->mutex);
96+
kfree(tscm);
9697
}
9798

9899
static void tscm_card_free(struct snd_card *card)

0 commit comments

Comments
 (0)