Commit 6fa6586
ALSA: hda - Fix a memory leak bug
commit cfef67f upstream.
In snd_hda_parse_generic_codec(), 'spec' is allocated through kzalloc().
Then, the pin widgets in 'codec' are parsed. However, if the parsing
process fails, 'spec' is not deallocated, leading to a memory leak.
To fix the above issue, free 'spec' before returning the error.
Fixes: 352f7f9 ("ALSA: hda - Merge Realtek parser code to generic parser")
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I19576a1c256fe1b361581e755153706737a410111 parent 496052c commit 6fa6586
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5474 | 5474 | | |
5475 | 5475 | | |
5476 | 5476 | | |
5477 | | - | |
| 5477 | + | |
5478 | 5478 | | |
5479 | 5479 | | |
5480 | 5480 | | |
| |||
0 commit comments