Plug memory leaks in request_pty and channel->channel_type
Этот коммит содержится в:
родитель
7a5ffc8cee
Коммит
2f41af6cdf
@ -337,6 +337,7 @@ LIBSSH2_API int libssh2_channel_request_pty_ex(LIBSSH2_CHANNEL *channel, char *t
|
|||||||
LIBSSH2_FREE(session, packet);
|
LIBSSH2_FREE(session, packet);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
LIBSSH2_FREE(session, packet);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
@ -663,6 +664,11 @@ LIBSSH2_API int libssh2_channel_free(LIBSSH2_CHANNEL *channel)
|
|||||||
LIBSSH2_FREE(session, data);
|
LIBSSH2_FREE(session, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* free "channel_type" */
|
||||||
|
if (channel->channel_type) {
|
||||||
|
LIBSSH2_FREE(session, channel->channel_type);
|
||||||
|
}
|
||||||
|
|
||||||
/* Unlink from channel brigade */
|
/* Unlink from channel brigade */
|
||||||
if (channel->prev) {
|
if (channel->prev) {
|
||||||
channel->prev->next = channel->next;
|
channel->prev->next = channel->next;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user