Discussion:
[tmux PATCH] Add missing va_end() calls
Thomas Jarosch
2014-12-13 11:02:02 UTC
Permalink
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);
}
--
1.9.3
Nicholas Marriott
2014-12-15 09:24:45 UTC
Permalink
Applied, thanks.
Post by Thomas Jarosch
Reported by cppcheck
---
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);
+ va_end(ap2);
*ret = NULL;
return (-1);
}
--
1.9.3
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...