Re: [PATCH 5/6] staging: dgap: tty.c: removes smatch warnings "potential null dereference"

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

 



On Wed, Sep 25, 2013 at 01:22:08PM -0400, Lidza Louina wrote:
> 
> I looked at other uses of the function alloc_tty_driver() in
> the kernel and none of them seem to follow up with a
> call to kfree().

Read my first response again.  I showed how to do this.  Your setting
up a bunch of things in a line.  If any of them fail you need to
cleanup by releasing any allocations.

If you have an allocation from alloc_tty_driver() then you can't release
it with kfree() you need to use put_tty_driver().

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux