xref: /aosp_15_r20/external/mbedtls/scripts/find-mem-leak.cocci (revision 62c56f9862f102b96d72393aff6076c951fb8148)
1@@
2expression x, y;
3statement S;
4@@
5  x = mbedtls_calloc(...);
6  y = mbedtls_calloc(...);
7  ...
8* if (x == NULL || y == NULL)
9    S
10
11@@
12expression x, y;
13statement S;
14@@
15  if (
16*   (x = mbedtls_calloc(...)) == NULL
17    ||
18*   (y = mbedtls_calloc(...)) == NULL
19  )
20    S
21