summaryrefslogtreecommitdiffstats
path: root/src/options.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-10-05 11:11:51 +0200
committerAndreas Schneider <asn@cryptomilk.org>2012-10-05 11:12:13 +0200
commit213321d706665b42a5aa0b981958537e5dbe0a38 (patch)
tree730ef383aee3040b40fe5bf5d2e155d485f53e12 /src/options.c
parentcddfe602cc5ee7e7d925a0673570549e2f9fcd61 (diff)
downloadlibssh-213321d706665b42a5aa0b981958537e5dbe0a38.tar.gz
libssh-213321d706665b42a5aa0b981958537e5dbe0a38.tar.xz
libssh-213321d706665b42a5aa0b981958537e5dbe0a38.zip
options: Fix a memory in ssh_options_copy() on error.
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index c1df1ff..844d3a5 100644
--- a/src/options.c
+++ b/src/options.c
@@ -112,6 +112,7 @@ int ssh_options_copy(ssh_session src, ssh_session *dest) {
rc = ssh_list_append(new->opts.identity, id);
if (rc < 0) {
+ free(id);
ssh_free(new);
return -1;
}