diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2019-12-05 00:33:21 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2019-12-05 00:34:15 +0100 |
commit | 91b06924d96afcf0f1d0e9c547eb15f01c78fffb (patch) | |
tree | 40017dfdc10bbf6ee55a5affce794af3e587263c /0001-media-usb-fix-memory-leak-in-af9005_identify_state.patch | |
parent | 2adce5aeb6c95194af74c43c1598563c4748823a (diff) | |
parent | 6b45f47575b44ead23d61138c8f080fbb9f81f80 (diff) | |
download | kernel-91b06924d96afcf0f1d0e9c547eb15f01c78fffb.tar.gz kernel-91b06924d96afcf0f1d0e9c547eb15f01c78fffb.tar.xz kernel-91b06924d96afcf0f1d0e9c547eb15f01c78fffb.zip |
merge originkernel-5.4.2-350.vanilla.knurd.1.fc31
Diffstat (limited to '0001-media-usb-fix-memory-leak-in-af9005_identify_state.patch')
-rw-r--r-- | 0001-media-usb-fix-memory-leak-in-af9005_identify_state.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/0001-media-usb-fix-memory-leak-in-af9005_identify_state.patch b/0001-media-usb-fix-memory-leak-in-af9005_identify_state.patch new file mode 100644 index 000000000..13aae5af8 --- /dev/null +++ b/0001-media-usb-fix-memory-leak-in-af9005_identify_state.patch @@ -0,0 +1,36 @@ +From 2289adbfa559050d2a38bcd9caac1c18b800e928 Mon Sep 17 00:00:00 2001 +From: Navid Emamdoost <navid.emamdoost@gmail.com> +Date: Wed, 9 Oct 2019 12:01:47 -0300 +Subject: [PATCH] media: usb: fix memory leak in af9005_identify_state + +In af9005_identify_state when returning -EIO the allocated buffer should +be released. Replace the "return -EIO" with assignment into ret and move +deb_info() under a check. + +Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech") +Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> +Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> +Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> +--- + drivers/media/usb/dvb-usb/af9005.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/usb/dvb-usb/af9005.c b/drivers/media/usb/dvb-usb/af9005.c +index 02697d86e8c1..ac93e88d7038 100644 +--- a/drivers/media/usb/dvb-usb/af9005.c ++++ b/drivers/media/usb/dvb-usb/af9005.c +@@ -976,8 +976,9 @@ static int af9005_identify_state(struct usb_device *udev, + else if (reply == 0x02) + *cold = 0; + else +- return -EIO; +- deb_info("Identify state cold = %d\n", *cold); ++ ret = -EIO; ++ if (!ret) ++ deb_info("Identify state cold = %d\n", *cold); + + err: + kfree(buf); +-- +2.23.0 + |