Merge branch 'ab/wildmatch-glob-slash-test'
[gitweb.git] / grep.c
diff --git a/grep.c b/grep.c
index d7ef21358ea7f592dffff98884eb34169e097880..06c4c249266acf5123c2de21a2a68b489e522ca5 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -508,7 +508,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
                if (!p->pcre2_jit_stack)
                        die("Couldn't allocate PCRE2 JIT stack");
                p->pcre2_match_context = pcre2_match_context_create(NULL);
-               if (!p->pcre2_jit_stack)
+               if (!p->pcre2_match_context)
                        die("Couldn't allocate PCRE2 match context");
                pcre2_jit_stack_assign(p->pcre2_match_context, NULL, p->pcre2_jit_stack);
        } else if (p->pcre2_jit_on != 0) {