mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Don't allocate a new identity list in the new session's options.
The previous list is not freed. Since the new session just got
created, an identity list is already allocated and empty.
Signed-off-by: Sebastien Boving <seb@google.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit e020dd8d59)
This commit is contained in:
committed by
Andreas Schneider
parent
1accbcb98b
commit
196c2e9c1f
@@ -93,12 +93,6 @@ int ssh_options_copy(ssh_session src, ssh_session *dest) {
|
||||
if (src->opts.identity) {
|
||||
struct ssh_iterator *it;
|
||||
|
||||
new->opts.identity = ssh_list_new();
|
||||
if (new->opts.identity == NULL) {
|
||||
ssh_free(new);
|
||||
return -1;
|
||||
}
|
||||
|
||||
it = ssh_list_get_iterator(src->opts.identity);
|
||||
while (it) {
|
||||
char *id;
|
||||
|
||||
Reference in New Issue
Block a user