From 13fe9767cf8487f9f9c1939ab49de37e608ca623 Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Sun, 22 Oct 2017 16:17:44 +0000 Subject: [PATCH] Fix memory leak issue introduced in last bug fix in pcre2grep. --- src/pcre2grep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pcre2grep.c b/src/pcre2grep.c index d7410b4..d75917c 100644 --- a/src/pcre2grep.c +++ b/src/pcre2grep.c @@ -3051,7 +3051,8 @@ if (isdirectory(pathname)) if (fnlength > FNBUFSIZ) { fprintf(stderr, "pcre2grep: recursive filename is too long\n"); - return 2; + rc = 2; + break; } sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile); frc = grep_or_recurse(buffer, dir_recurse, FALSE);