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.
diff --git a/contrib/mod_defender/defender.c b/contrib/mod_defender/defender.c
index c86d25e..1734176 100644
--- a/contrib/mod_defender/defender.c
+++ b/contrib/mod_defender/defender.c
@@ -149,9 +149,10 @@
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;