Fix memory leak issue introduced in last bug fix in pcre2grep.

This commit is contained in:
Philip.Hazel 2017-10-22 16:17:44 +00:00
parent 3a55923da8
commit 13fe9767cf
1 changed files with 2 additions and 1 deletions

View File

@ -3051,7 +3051,8 @@ if (isdirectory(pathname))
if (fnlength > FNBUFSIZ) if (fnlength > FNBUFSIZ)
{ {
fprintf(stderr, "pcre2grep: recursive filename is too long\n"); fprintf(stderr, "pcre2grep: recursive filename is too long\n");
return 2; rc = 2;
break;
} }
sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile); sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile);
frc = grep_or_recurse(buffer, dir_recurse, FALSE); frc = grep_or_recurse(buffer, dir_recurse, FALSE);