mbed TLS upgraded to 2.6.0
Fork of mbedtls by
Diff: scripts/find-mem-leak.cocci
- Revision:
- 1:9ebc941037d5
diff -r cdf462088d13 -r 9ebc941037d5 scripts/find-mem-leak.cocci --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/find-mem-leak.cocci Fri Sep 29 18:41:59 2017 +0100 @@ -0,0 +1,20 @@ +@@ +expression x, y; +statement S; +@@ + x = mbedtls_malloc(...); + y = mbedtls_malloc(...); + ... +* if (x == NULL || y == NULL) + S + +@@ +expression x, y; +statement S; +@@ + if ( +* (x = mbedtls_malloc(...)) == NULL + || +* (y = mbedtls_malloc(...)) == NULL + ) + S