summaryrefslogtreecommitdiff
path: root/usr.bin/less/pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/less/pattern.c')
-rw-r--r--usr.bin/less/pattern.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/less/pattern.c b/usr.bin/less/pattern.c
index 36f61c73663..6e98ff28b0e 100644
--- a/usr.bin/less/pattern.c
+++ b/usr.bin/less/pattern.c
@@ -122,6 +122,8 @@ match_pattern(void *pattern, char *tpattern, char *line, int line_len,
rm.rm_so = 0;
rm.rm_eo = line_len;
#endif
+ *sp = NULL;
+ *ep = NULL;
matched = !regexec(spattern, line, 1, &rm, flags);
if (matched) {
*sp = line + rm.rm_so;