mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
agent: Avoid memory leaks
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -404,9 +404,7 @@ uint32_t ssh_agent_get_ident_count(struct ssh_session_struct *session)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (session->agent->ident) {
|
||||
ssh_buffer_reinit(session->agent->ident);
|
||||
}
|
||||
ssh_buffer_free(session->agent->ident);
|
||||
session->agent->ident = reply;
|
||||
|
||||
return session->agent->count;
|
||||
|
||||
Reference in New Issue
Block a user