diff --git a/scripts/find-mem-leak.cocci b/scripts/find-mem-leak.cocci index a3f7ca99c..34cfd082d 100644 --- a/scripts/find-mem-leak.cocci +++ b/scripts/find-mem-leak.cocci @@ -7,3 +7,14 @@ statement S; ... * if (x == NULL || y == NULL) S + +@@ +expression x, y; +statement S; +@@ + if ( +* (x = polarssl_malloc(...)) == NULL + || +* (y = polarssl_malloc(...)) == NULL + ) + S