diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2014-02-05 08:07:45 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2014-02-05 08:07:45 +0100 |
commit | c28ad814d0a7a5279a31feea91aaa83762270ff3 (patch) | |
tree | d30bf0c55e86ec93b3de1e99638308f6b98b7c93 /src/kex.c | |
parent | fdc660f313a1e8d692c1131d8ac35e83288c0d85 (diff) | |
download | libssh-c28ad814d0a7a5279a31feea91aaa83762270ff3.tar.gz libssh-c28ad814d0a7a5279a31feea91aaa83762270ff3.tar.xz libssh-c28ad814d0a7a5279a31feea91aaa83762270ff3.zip |
knownhosts: resolve leaks found by coverity
Diffstat (limited to 'src/kex.c')
-rw-r--r-- | src/kex.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -390,8 +390,10 @@ static char *ssh_client_select_hostkeys(ssh_session session){ int needcoma=0; methods = ssh_knownhosts_algorithms(session); - if (methods == NULL || methods[0] == NULL) + if (methods == NULL || methods[0] == NULL){ + SAFE_FREE(methods); return NULL; + } for (i=0;preferred_hostkeys[i] != NULL; ++i){ for (j=0; methods[j] != NULL; ++j){ |