Browse Source
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>maint


2 changed files with 6 additions and 2 deletions
@ -0,0 +1,5 @@ |
|||||||
|
@@ |
||||||
|
expression E; |
||||||
|
@@ |
||||||
|
- if (E) |
||||||
|
free(E); |
Loading…
Reference in new issue