diff options
author | 2015-12-28 23:01:22 +0000 | |
---|---|---|
committer | 2015-12-28 23:01:22 +0000 | |
commit | 101bb3659f122057afe4c67c9bce207cb2bdbab4 (patch) | |
tree | 8a296e69c14d7cf3907500867086b299b6e82663 /lib/libc/regex/engine.c | |
parent | Replace lseek/[read|write] with pread|pwrite. (diff) | |
download | wireguard-openbsd-101bb3659f122057afe4c67c9bce207cb2bdbab4.tar.xz wireguard-openbsd-101bb3659f122057afe4c67c9bce207cb2bdbab4.zip |
Remove NULL-checks before free() and needless argument casts.
ok tb@
Diffstat (limited to 'lib/libc/regex/engine.c')
-rw-r--r-- | lib/libc/regex/engine.c | 8 |
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); } |