In the Linux kernel, the following vulnerability has been resolved: pinctrl: thunderbay: fix possible memory leak in thunderbaybuildfunctions() The thunderbayaddfunctions() will free memory of thunderbayfuncs when everything is ok, but thunderbayfuncs will not be freed when thunderbayaddfunctions() fails, then there will be a memory leak, so we need to add kfree() when thunderbayaddfunctions() fails to fix it. In addition, doing some cleaner works, moving kfree(funcs) from thunderbayaddfunctions() to thunderbaybuildfunctions().