]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Aug 2019 05:10:39 +0000 (07:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Aug 2019 05:10:39 +0000 (07:10 +0200)
added patches:
alsa-hda-fix-a-memory-leak-bug.patch

queue-4.4/alsa-hda-fix-a-memory-leak-bug.patch [new file with mode: 0644]
queue-4.4/series

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 (file)
index 0000000..e10d26d
--- /dev/null
@@ -0,0 +1,36 @@
+From cfef67f016e4c00a2f423256fc678a6967a9fc09 Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Fri, 9 Aug 2019 23:29:48 -0500
+Subject: ALSA: hda - Fix a memory leak bug
+
+From: Wenwen Wang <wenwen@cs.uga.edu>
+
+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 <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>
+
+---
+ 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)
index c7c77698d2574f716b712244e86c260169dc8bd8..ebd0f6e0f6bf615a92d3c73a8a383b46ea737097 100644 (file)
@@ -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