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