aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Hogan <[email protected]>2019-01-14 23:38:34 -0800
committerDoug Hogan <[email protected]>2019-01-14 23:39:26 -0800
commit7c80625748a1d95a20754c0927e13c00423c1277 (patch)
treeb0b788b3b4d7b41048d15eb6c03362d1bd3ca9ea
parent9ef96d08df6a55912dfbb8de2e460f719f5a6728 (diff)
downloadotp-7c80625748a1d95a20754c0927e13c00423c1277.tar.gz
otp-7c80625748a1d95a20754c0927e13c00423c1277.tar.bz2
otp-7c80625748a1d95a20754c0927e13c00423c1277.zip
Reference all of the free/release call positions in cocci file
-rw-r--r--lib/crypto/c_src/check_erlang.cocci6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/crypto/c_src/check_erlang.cocci b/lib/crypto/c_src/check_erlang.cocci
index cfcc0517cb..b2a981f2ac 100644
--- a/lib/crypto/c_src/check_erlang.cocci
+++ b/lib/crypto/c_src/check_erlang.cocci
@@ -29,7 +29,7 @@
type T;
identifier CTX, L;
identifier virtual.enif_alloc_resource, virtual.enif_release_resource;
-position p;
+position p, pr;
@@
T *CTX = NULL;
@@ -40,7 +40,7 @@ position p;
... when strict, forall
if (CTX)
- enif_release_resource(CTX);
+ enif_release_resource(CTX)@pr;
// After calling enif_alloc_binary(), you must either release it with
@@ -179,7 +179,7 @@ identifier FUNCNEW =~ "^(enif_make_atom|enif_make_badarg|enif_make_binary|enif_m
position pnew != {erlang_check_new.p,enif_alloc_binary.pm};
identifier FUNCFREE =~ "^(enif_free|enif_free_env|enif_free_iovec|enif_release_binary|enif_release_resource)$";
-position pfree != {enif_alloc_resource.p,erlang_check_null_free.p};
+position pfree != {enif_alloc_resource.pr,enif_alloc_binary.pr,erlang_check_null_free.p};
@@