mirror of
https://github.com/sheumann/telnetd.git
synced 2025-02-19 18:30:30 +00:00
Make sure that each va_start has one and only one matching va_end,
especially in error cases. git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@241021 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
parent
2e1696417c
commit
6b099757e8
@ -1600,8 +1600,10 @@ output_data(const char *format, ...)
|
||||
char *buf;
|
||||
|
||||
va_start(args, format);
|
||||
if ((len = vasprintf(&buf, format, args)) == -1)
|
||||
if ((len = vasprintf(&buf, format, args)) == -1) {
|
||||
va_end(args);
|
||||
return -1;
|
||||
}
|
||||
output_datalen(buf, len);
|
||||
va_end(args);
|
||||
free(buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user