mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
Nullify pattern after failed regcomp
This commit is contained in:
parent
8bb722a390
commit
9c5df0ae70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293
|
@ -86,7 +86,8 @@ optpat()
|
||||||
patlock = 0;
|
patlock = 0;
|
||||||
if (n = regcomp(exp, exps, 0)) {
|
if (n = regcomp(exp, exps, 0)) {
|
||||||
regerror(n, exp, errmsg, sizeof errmsg);
|
regerror(n, exp, errmsg, sizeof errmsg);
|
||||||
return NULL;
|
free(exp);
|
||||||
|
return exp = NULL;
|
||||||
}
|
}
|
||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue