Powered by Linux
Re: Memory leak warning - false positive — Semantic Matching Tool

Re: Memory leak warning - false positive

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

 



On Thu, Feb 25, 2016 at 11:57:37AM +0200, Amir Vadai" wrote:
> I guess I can replace the
> if (!old)
> 	kfree()
> with:
> if (old)
> 	flow = NULL;
> kfree(flow)
> 
> But it looks ugly...
>

Please, don't make the code uglier just to make the tools happy.

This is slightly different from your test code and it's something that
Smatch is *supposed* to be able to figure out.  I will investigate.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux