commit | 961c626d6d494cc520777498536239cd93623568 | [log] [tgz] |
---|---|---|
author | Mansour Moufid <mansourmoufid@gmail.com> | Tue Feb 17 13:07:29 2015 -0500 |
committer | Mansour Moufid <mansourmoufid@gmail.com> | Tue Feb 17 13:07:29 2015 -0500 |
tree | 82b9a47de6d4f5d8cdd4a1f75e61ed65ddb27eec | |
parent | bd1d44e25190b2a9458946d1f6056b6965ed03fd [diff] [blame] |
Add a semantic patch to find potential memory leaks.
diff --git a/scripts/find-mem-leak.cocci b/scripts/find-mem-leak.cocci new file mode 100644 index 0000000..a3f7ca9 --- /dev/null +++ b/scripts/find-mem-leak.cocci
@@ -0,0 +1,9 @@ +@@ +expression x, y; +statement S; +@@ + x = polarssl_malloc(...); + y = polarssl_malloc(...); + ... +* if (x == NULL || y == NULL) + S