summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>2000-07-07 07:47:39 +0000
committerdcs <dcs@FreeBSD.org>2000-07-07 07:47:39 +0000
commit50b6717af11d20aa108f81bfc82eb444451b1a0f (patch)
tree6f43d83a85aeefeb4dbf71b880bdf79b7c0ee3a5 /lib/libc/regex
parent88593e5a993ce0a65b73111dbfbeafda775878e6 (diff)
downloadFreeBSD-src-50b6717af11d20aa108f81bfc82eb444451b1a0f.zip
FreeBSD-src-50b6717af11d20aa108f81bfc82eb444451b1a0f.tar.gz
Do not free NULL pointers.
Diffstat (limited to 'lib/libc/regex')
-rw-r--r--lib/libc/regex/regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 9664084..f19e097 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -279,7 +279,7 @@ int cflags;
if(g->mlen > 3) {
computejumps(p, g);
computematchjumps(p, g);
- if(g->matchjump == NULL) {
+ if(g->matchjump == NULL && g->charjump != NULL) {
free(g->charjump);
g->charjump = NULL;
}
OpenPOWER on IntegriCloud