kfree calls cleanup
PATCH 1/1 kfree calls cleanup
i've removed some useless test for NULL pointer before kfree calls. if(p) kfree(p) -> kfree(p)
i've also removed variables that have become unused.
the patch is quite big, but i've check it many times.
Signature · 4 lines
Benoît Dejean JID: [email protected] http://gdesklets.gnomedesktop.org http://www.paulla.asso.fr
Quoted 4 lines · Benoît Dejean
i've removed some useless test for NULL pointer before kfree calls. if(p) kfree(p) -> kfree(p)
i've also removed variables that have become unused.
the patch is quite big, but i've check it many times.
This is valid since kfree checks for null pointer, but while the extra "if (p)" is redundant, if p is most often NULL somewhere, then you can avoid the function call overhead by this very low-cost check. (Unless kfree is a macro which includes the check in the macro.)