This patch makes sure va_end() is called an a va_list before va_start() is called again.
This commit is contained in:
parent
b2f436deae
commit
9a2db7d430
1 changed files with 6 additions and 2 deletions
|
@ -109,8 +109,10 @@ int re_regex(const char *ptr, size_t len, const char *expr, ...)
|
|||
if (!l)
|
||||
break;
|
||||
|
||||
if (tolower(*ep) != tolower(*p))
|
||||
if (tolower(*ep) != tolower(*p)) {
|
||||
va_end(ap);
|
||||
goto again;
|
||||
}
|
||||
|
||||
eesc = false;
|
||||
++p;
|
||||
|
@ -184,8 +186,10 @@ int re_regex(const char *ptr, size_t len, const char *expr, ...)
|
|||
nm -= 2;
|
||||
}
|
||||
|
||||
if ((nm < nmin) || (nm > nmax))
|
||||
if ((nm < nmin) || (nm > nmax)) {
|
||||
va_end(ap);
|
||||
goto again;
|
||||
}
|
||||
|
||||
if (pl)
|
||||
*pl = lpl;
|
||||
|
|
Loading…
Add table
Reference in a new issue