Skip to content

Commit 498fe23

Browse files
takaswietiwai
authored andcommitted
ALSA: oxfw: fix memory leak of private data
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: 6c29230 ('ALSA: oxfw: delayed registration of sound card') Cc: <[email protected]> # v4.7+ Signed-off-by: Takashi Sakamoto <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 8d28277 commit 498fe23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/firewire/oxfw/oxfw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ static void oxfw_free(struct snd_oxfw *oxfw)
130130

131131
kfree(oxfw->spec);
132132
mutex_destroy(&oxfw->mutex);
133+
kfree(oxfw);
133134
}
134135

135136
/*

0 commit comments

Comments
 (0)