aboutsummaryrefslogtreecommitdiff
path: root/src/options.c
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:28:36 +0200
commite020dd8d5917c3c957b73211cecc618d9f0207cb (patch)
treec8f73ae1d00f88c839a012102c60cfae6f6cc7e9 /src/options.c
parenta65af1b3b8a4ea50fd687b6583eac93e38cf4f3b (diff)
downloadlibssh-e020dd8d5917c3c957b73211cecc618d9f0207cb.tar.gz
libssh-e020dd8d5917c3c957b73211cecc618d9f0207cb.tar.xz
libssh-e020dd8d5917c3c957b73211cecc618d9f0207cb.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>
Diffstat (limited to 'src/options.c')
-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;