Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/tools/coccinelle/free.cocci # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / tools / coccinelle / free.cocci` 37 lines ยท 313 bytes Raw Blame History 1 @@ 2 expression E; 3 @@ 4 - if (E) 5 ( 6 free(E); 7 | 8 commit_list_free(E); 9 | 10 FREE_AND_NULL(E); 11 ) 12 13 @@ 14 expression E; 15 @@ 16 - free(E); 17 + FREE_AND_NULL(E); 18 - E = NULL; 19 20 @@ 21 expression E; 22 @@ 23 - if (E) 24 - { 25 commit_list_free(E); 26 E = NULL; 27 - } 28 29 @@ 30 expression E; 31 statement S; 32 @@ 33 - if (E) { 34 + if (E) 35 S 36 commit_list_free(E); 37 - }