agent: Fix possible memory leak.
Этот коммит содержится в:
родитель
de4cb811a0
Коммит
f0a362fdbe
@ -287,9 +287,14 @@ int ssh_agent_get_ident_count(struct ssh_session_struct *session) {
|
|||||||
|
|
||||||
/* send message to the agent requesting the list of identities */
|
/* send message to the agent requesting the list of identities */
|
||||||
request = ssh_buffer_new();
|
request = ssh_buffer_new();
|
||||||
|
if (request == NULL) {
|
||||||
|
ssh_set_error_oom(request);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (buffer_add_u8(request, c1) < 0) {
|
if (buffer_add_u8(request, c1) < 0) {
|
||||||
ssh_set_error(session, SSH_FATAL, "Not enough space");
|
ssh_set_error_oom(request);
|
||||||
return -1;
|
ssh_buffer_free(request);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
reply = ssh_buffer_new();
|
reply = ssh_buffer_new();
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user