Newer
Older
XinYang_IOS / Carthage / Checkouts / OpenVPNAdapter / Sources / mbedTLS / scripts / find-mem-leak.cocci
@zhangfeng zhangfeng on 7 Dec 2023 269 bytes 1.8.0
@@
expression x, y;
statement S;
@@
  x = mbedtls_calloc(...);
  y = mbedtls_calloc(...);
  ...
* if (x == NULL || y == NULL)
    S

@@
expression x, y;
statement S;
@@
  if (
*   (x = mbedtls_calloc(...)) == NULL
    ||
*   (y = mbedtls_calloc(...)) == NULL
  )
    S