aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/ed/re.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ed/re.c b/bin/ed/re.c
index 3fad099c9437..2bf12219f8d8 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -86,7 +86,8 @@ optpat()
patlock = 0;
if (n = regcomp(exp, exps, 0)) {
regerror(n, exp, errmsg, sizeof errmsg);
- return NULL;
+ free(exp);
+ return exp = NULL;
}
return exp;
}