Skip to content

Commit

Permalink
ngx-releng: check mistakes of not checking return values of ngx_alloc().
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Aug 8, 2014
1 parent 9a2755a commit b9d842f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ngx-releng
Expand Up @@ -100,7 +100,7 @@ perl -e 'use strict; use warnings;
open my $in, $fname or die $!;
while (<$in>) {
next if /^\s*$/ || m{^\s*/\*};
if (/ngx_p[cn]*alloc\b|\b[mc]alloc\b|\bngx_array_push\b|\bngx_array_create\b|\bngx_alloc_chain_link\b|\bngx_c?alloc_buf\b|\bngx_create_temp_buf\b/) {
if (/ngx_(?:p[cn]*)?alloc\b|\b[mc]alloc\b|\bngx_array_push\b|\bngx_array_create\b|\bngx_alloc_chain_link\b|\bngx_c?alloc_buf\b|\bngx_create_temp_buf\b/) {
my $pattern = $&;
#warn "got pattern: $pattern\n";
if (!/return\b.*?\Q$pattern\E/ && !/"[^"]*\Q$pattern\E/ && !/^\s+\*/) {
Expand Down

0 comments on commit b9d842f

Please sign in to comment.