Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libtelnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,7 @@ int telnet_vprintf(telnet_t *telnet, const char *fmt, va_list va) {
if (output == 0) {
_error(telnet, __LINE__, __func__, TELNET_ENOMEM, 0,
"malloc() failed: %s", strerror(errno));
va_end(va2);
Copy link
Contributor

@Shea690901 Shea690901 May 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing va_end(va);
The same with the change further down....

return -1;
}
rs = vsnprintf(output, rs + 1, fmt, va2);
Expand Down Expand Up @@ -1551,6 +1552,7 @@ int telnet_raw_vprintf(telnet_t *telnet, const char *fmt, va_list va) {
if (output == 0) {
_error(telnet, __LINE__, __func__, TELNET_ENOMEM, 0,
"malloc() failed: %s", strerror(errno));
va_end(va2);
return -1;
}
rs = vsnprintf(output, rs + 1, fmt, va2);
Expand Down