mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add sanity check for "no previous regular expression" state,
bringed by 'more'
This commit is contained in:
parent
28d8923ed0
commit
a7f57b7141
1 changed files with 4 additions and 1 deletions
|
|
@ -59,8 +59,11 @@ char *
|
|||
re_comp(s)
|
||||
char *s;
|
||||
{
|
||||
if (s == NULL || *s == '\0')
|
||||
if (s == NULL || *s == '\0') {
|
||||
if (re_regexp == NULL)
|
||||
return "no previous regular expression";
|
||||
return (NULL);
|
||||
}
|
||||
if (re_regexp)
|
||||
free(re_regexp);
|
||||
if (re_errstr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue