kernel_optimize_test/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
Makefile
sms-cards.c [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge 2011-03-22 19:24:14 -03:00
sms-cards.h
smscoreapi.c
smscoreapi.h
smsdvb.c Fix common misspellings 2011-03-31 11:26:23 -03:00
smsendian.c
smsendian.h
smsir.c
smsir.h
smssdio.c
smsusb.c [media] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free' 2011-05-20 09:28:57 -03:00