summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/regex/engine.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index 95b8a8ff64b..fe7b0ff9133 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.18 2014/10/09 02:50:16 deraadt Exp $ */
+/* $OpenBSD: engine.c,v 1.19 2015/12/28 23:01:22 mmcc Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
@@ -277,10 +277,8 @@ matcher(struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[],
}
}
- if (m->pmatch != NULL)
- free((char *)m->pmatch);
- if (m->lastpos != NULL)
- free((char *)m->lastpos);
+ free(m->pmatch);
+ free(m->lastpos);
STATETEARDOWN(m);
return(0);
}