mem-include-scan.pl: require a non-word letter before memory funcs

... so that ldap_memfree() for example doesn't match the scan for free.

Closes #7061
This commit is contained in:
Daniel Stenberg 2021-05-14 23:11:00 +02:00
parent acf91ff75e
commit e35d7c0492
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 2 additions and 2 deletions

View File

@ -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 # This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms # you should have received as part of this distribution. The terms
@ -43,7 +43,7 @@ sub scanfile {
open(F, "<$file"); open(F, "<$file");
while(<F>) { while(<F>) {
if($_ =~ /(free|alloc|strdup)\(/) { if($_ =~ /\W(free|alloc|strdup)\(/) {
$memfunc++; $memfunc++;
} }
elsif($_ =~ /^ *# *include \"memdebug.h\"/) { elsif($_ =~ /^ *# *include \"memdebug.h\"/) {