This website requires JavaScript.
Explore
Help
Sign In
undef
/
git-commit-vandalism
Watch
1
Star
0
Fork
0
You've already forked git-commit-vandalism
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
768c7cb710
git-commit-vandalism
/
contrib
/
coccinelle
/
free.cocci
12 lines
82 B
Plaintext
Raw
Normal View
History
Unescape
Escape
remove unnecessary NULL check before free(3) free(3) handles NULL pointers just fine. Add a semantic patch for removing unnecessary NULL checks before calling this function, and apply it on the code base. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-10-08 16:14:57 +02:00
@@
expression E;
@@
- if (E)
free(E);
cocci: detect useless free(3) calls Add a semantic patch for removing checks that cause free(3) to only be called with a NULL pointer, as that must be a programming mistake. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-11 14:58:44 +01:00
@@
expression E;
@@
- if (!E)
free(E);
Reference in New Issue
Copy Permalink