aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeb Boving <seb@google.com>2015-06-04 15:39:36 -0700
committerAndreas Schneider <asn@cryptomilk.org>2015-06-24 18:36:10 +0200
commit196c2e9c1fa6b7eec3b80d79d08011cb39dd6454 (patch)
tree65f324a436a0c08574015faca2d005ff3390dbb6
parent1accbcb98bd4c259151b6103b0771f2bed6a109c (diff)
downloadlibssh-196c2e9c1fa6b7eec3b80d79d08011cb39dd6454.tar.gz
libssh-196c2e9c1fa6b7eec3b80d79d08011cb39dd6454.tar.xz
libssh-196c2e9c1fa6b7eec3b80d79d08011cb39dd6454.zip
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 e020dd8d5917c3c957b73211cecc618d9f0207cb)
-rw-r--r--src/options.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/options.c b/src/options.c
index 44b1a888..e715c09d 100644
--- a/src/options.c
+++ b/src/options.c
@@ -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;