]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mem-include-scan.pl: require a non-word letter before memory funcs
authorDaniel Stenberg <daniel@haxx.se>
Fri, 14 May 2021 21:11:00 +0000 (23:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 15 May 2021 15:47:37 +0000 (17:47 +0200)
... so that ldap_memfree() for example doesn't match the scan for free.

Closes #7061

tests/mem-include-scan.pl

index f04e6a649c70eca40c2a80e0f0094d7184f493bc..44c261b9cc73a1122e99bc7879c924d45c264a35 100755 (executable)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2010 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2010 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -43,7 +43,7 @@ sub scanfile {
 
     open(F, "<$file");
     while(<F>) {
-        if($_ =~ /(free|alloc|strdup)\(/) {
+        if($_ =~ /\W(free|alloc|strdup)\(/) {
             $memfunc++;
         }
         elsif($_ =~ /^ *# *include \"memdebug.h\"/) {