commit | 263438b071996ae426a5ed3a591d5aca0f81c64a | [log] [tgz] |
---|---|---|
author | Mansour Moufid <mansourmoufid@gmail.com> | Tue Feb 17 13:40:48 2015 -0500 |
committer | Mansour Moufid <mansourmoufid@gmail.com> | Tue Feb 17 13:41:23 2015 -0500 |
tree | ebc1a593aed5ed01798a16cff84b958a46aa9fe6 | |
parent | f81088bb80a35644f15bf19fccb71556cee10fe4 [diff] [blame] |
Add a rule for another type of memory leak to find-mem-leak.cocci.
diff --git a/scripts/find-mem-leak.cocci b/scripts/find-mem-leak.cocci index a3f7ca9..34cfd08 100644 --- a/scripts/find-mem-leak.cocci +++ b/scripts/find-mem-leak.cocci
@@ -7,3 +7,14 @@ ... * if (x == NULL || y == NULL) S + +@@ +expression x, y; +statement S; +@@ + if ( +* (x = polarssl_malloc(...)) == NULL + || +* (y = polarssl_malloc(...)) == NULL + ) + S