Thomas Jarosch
2014-12-13 11:02:02 UTC
Reported by cppcheck
Signed-off-by: Thomas Jarosch <***@intra2net.com>
---
compat/asprintf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compat/asprintf.c b/compat/asprintf.c
index 733fc81..09020b3 100644
--- a/compat/asprintf.c
+++ b/compat/asprintf.c
@@ -54,10 +54,12 @@ vasprintf(char **ret, const char *fmt, va_list ap)
free(*ret);
goto error;
}
+ va_end(ap2);
return (n);
error:
+ va_end(ap2);
*ret = NULL;
return (-1);
}
Signed-off-by: Thomas Jarosch <***@intra2net.com>
---
compat/asprintf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compat/asprintf.c b/compat/asprintf.c
index 733fc81..09020b3 100644
--- a/compat/asprintf.c
+++ b/compat/asprintf.c
@@ -54,10 +54,12 @@ vasprintf(char **ret, const char *fmt, va_list ap)
free(*ret);
goto error;
}
+ va_end(ap2);
return (n);
error:
+ va_end(ap2);
*ret = NULL;
return (-1);
}
--
1.9.3
1.9.3