diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-06-19 22:01:48 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-21 09:18:44 -0700 |
commit | 674ad936bb40332e016b60c59d1982c832338493 (patch) | |
tree | 14d30add5af518a535288ffb1a638d1ff3f7993c /git-sh-i18n.sh | |
parent | grep: add support for PCRE v2 (diff) | |
download | tgif-674ad936bb40332e016b60c59d1982c832338493.tar.xz |
grep: fix erroneously copy/pasted variable in check/assert pattern
Fix an erroneously copy/pasted check for the pcre2_jit_stack variable
to check pcre2_match_context instead. The former was already checked
in the preceding "if" statement.
This is a trivial and obvious error introduced in my commit
94da9193a6 ("grep: add support for PCRE v2", 2017-06-01).
In practice if pcre2_match_context_create() returned NULL we were
likely in a situation where malloc() was returning NULL, and were thus
screwed anyway, but if only the pcre2_match_context_create() call
returned NULL (through some transitory bug) PCRE v2 would just
allocate and supply its own context object when matching, and we'd run
normally at the trivial expense of not getting a slight speedup by
sharing the context object between successive matches.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-sh-i18n.sh')
0 files changed, 0 insertions, 0 deletions