From: Greg Kroah-Hartman Date: Sun, 18 Aug 2019 05:10:39 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.19.68~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c701ea86c0ce1a84b043cdf1fb4d6b740a8ef640;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-hda-fix-a-memory-leak-bug.patch --- diff --git a/queue-4.4/alsa-hda-fix-a-memory-leak-bug.patch b/queue-4.4/alsa-hda-fix-a-memory-leak-bug.patch new file mode 100644 index 00000000000..e10d26d834c --- /dev/null +++ b/queue-4.4/alsa-hda-fix-a-memory-leak-bug.patch @@ -0,0 +1,36 @@ +From cfef67f016e4c00a2f423256fc678a6967a9fc09 Mon Sep 17 00:00:00 2001 +From: Wenwen Wang +Date: Fri, 9 Aug 2019 23:29:48 -0500 +Subject: ALSA: hda - Fix a memory leak bug + +From: Wenwen Wang + +commit cfef67f016e4c00a2f423256fc678a6967a9fc09 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: 352f7f914ebb ("ALSA: hda - Merge Realtek parser code to generic parser") +Signed-off-by: Wenwen Wang +Cc: +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_generic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/hda_generic.c ++++ b/sound/pci/hda/hda_generic.c +@@ -5917,7 +5917,7 @@ static int snd_hda_parse_generic_codec(s + + err = snd_hda_parse_pin_defcfg(codec, &spec->autocfg, NULL, 0); + if (err < 0) +- return err; ++ goto error; + + err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg); + if (err < 0) diff --git a/queue-4.4/series b/queue-4.4/series index c7c77698d25..ebd0f6e0f6b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -35,3 +35,4 @@ sh-kernel-hw_breakpoint-fix-missing-break-in-switch-statement.patch usb-gadget-f_midi-fail-if-set_alt-fails-to-allocate-requests.patch usb-gadget-f_midi-fixing-a-possible-double-free-in-f_midi.patch mm-memcontrol.c-fix-use-after-free-in-mem_cgroup_iter.patch +alsa-hda-fix-a-memory-leak-bug.patch