This patch makes sure va_end() is called an a va_list before va_start() is called again.

This commit is contained in:
Alfred E. Heggestad 2013-09-05 04:11:07 +00:00
parent b2f436deae
commit 9a2db7d430

View file

@ -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;