linux_dsm_epyc7002/drivers/media/dvb/siano
Jesper Juhl 08921ac9e9 [media] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free'
In drivers/media/dvb/siano/smsusb.c we have this code:
 ...
               kfree(dev);

               sms_info("device %p destroyed", dev);
 ...

at least one static analysis tool (Coverity Prevent) complains about this
as a use-after-free bug.
While it's true that we do use the pointer variable after freeing it, the
only use is to print the value of the pointer, so there's not actually any
problem here. But still, silencing the complaint is trivial by just moving
the kfree() call below the sms_info(), so why not just do it?. It doesn't
change the workings of the code in any way, but it makes the tool shut up.
The patch below also removes a rather pointless blank line.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:57 -03:00
..
Kconfig [media] rc: rename the remaining things to rc_core 2010-12-29 08:16:50 -02:00
Makefile V4L/DVB (12451): Update KConfig File to enable SDIO and USB interfaces 2009-08-31 02:24:53 -03:00
sms-cards.c [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge 2011-03-22 19:24:14 -03:00
sms-cards.h V4L/DVB: sms: Convert IR support to use the Remote Controller core 2010-08-02 16:43:56 -03:00
smscoreapi.c [media] ir-core: make struct rc_dev the primary interface 2010-12-29 08:16:37 -02:00
smscoreapi.h V4L/DVB (13846): smsdvb: Properly implement stats for both DVB and ISDB-T 2010-02-26 15:10:26 -03:00
smsdvb.c Fix common misspellings 2011-03-31 11:26:23 -03:00
smsendian.c V4L/DVB (11780): Siano: fix compilation error due to the lack of EXTERNAL_SYMBOL 2009-06-16 19:14:28 -03:00
smsendian.h V4L/DVB (11892): Siano: smsendian - declare function as extern 2009-06-16 19:14:43 -03:00
smsir.c [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
smsir.h [media] rc: rename the remaining things to rc_core 2010-12-29 08:16:50 -02:00
smssdio.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
smsusb.c [media] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free' 2011-05-20 09:28:57 -03:00