> Hi Julia and team, I had a question about whether it’s possible to use coccinelle/spatch to start to identify functions which are able to use inline destructors (__free or DEFINE_FREE()) from include/linux/cleanup.h Generally, yes. A specific cleanup function is mapped to a selected pointer type. Will any more collateral evolution happen according to the usage of “smart pointers”? > To some extent a missing kfree logic is already part of the scripts/cocci, but what I was curious about is whether spatch can find Further applications of the semantic patch language (Coccinelle software) have got a lot of potential. I find the corresponding data processing and development resources improvable in various ways. > 1. Function that allocates a stack variable which is a pointer (or has one passed as a pointer argument) > 2. Function calls *alloc > 3. Function calls kfree() before return in all paths after alloc I got the impression that advanced source code analyses can be very challenging for such cases. How will knowledge representations evolve accordingly? > I know this would be nearly impossible to auto-patch, but having a “grep” for this pattern would be super helpful. Can the support grow for such an idea considerably? > Would someone be interested in looking at this for the kernel? Yes, of course. > It seems like a valuable help to find refactoring locations. Would you like to help any more to benefit from known adjustment possibilities? Regards, Markus