Patch "media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-ttusb-dec-fix-memory-leak-in-ttusb_dec_exit_dv.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5501198d36ed0e7b2fb03d9c59db497a61849dfd
Author: Hyunwoo Kim <imv4bel@xxxxxxxxx>
Date:   Thu Nov 17 04:59:25 2022 +0000

    media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
    
    [ Upstream commit 517a281338322ff8293f988771c98aaa7205e457 ]
    
    Since dvb_frontend_detach() is not called in ttusb_dec_exit_dvb(),
    which is called when the device is disconnected, dvb_frontend_free()
    is not finally called.
    
    This causes a memory leak just by repeatedly plugging and
    unplugging the device.
    
    Fix this issue by adding dvb_frontend_detach() to ttusb_dec_exit_dvb().
    
    Link: https://lore.kernel.org/linux-media/20221117045925.14297-5-imv4bel@xxxxxxxxx
    Signed-off-by: Hyunwoo Kim <imv4bel@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index 38822cedd93a9..c4474d4c44e28 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -1544,8 +1544,7 @@ static void ttusb_dec_exit_dvb(struct ttusb_dec *dec)
 	dvb_dmx_release(&dec->demux);
 	if (dec->fe) {
 		dvb_unregister_frontend(dec->fe);
-		if (dec->fe->ops.release)
-			dec->fe->ops.release(dec->fe);
+		dvb_frontend_detach(dec->fe);
 	}
 	dvb_unregister_adapter(&dec->adapter);
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux