BUG/MINOR: contrib/mod_defender: close the va_list argp before return
Fix the case when the va_list argp could be left open if the function vsnprintf() returned a negative value.
This commit is contained in:
parent
f8bb0ce450
commit
ccf6100e11
|
@ -149,9 +149,10 @@ static char *defender_printf(apr_pool_t *pool, const char *fmt, ...)
|
|||
|
||||
va_start(argp, fmt);
|
||||
len = vsnprintf(NULL, 0, fmt, argp);
|
||||
va_end(argp);
|
||||
|
||||
if (len < 0)
|
||||
return NULL;
|
||||
va_end(argp);
|
||||
|
||||
if (!(dst = apr_pcalloc(pool, len + 1)))
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue