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:08:31 +0100 |
| commit | dca415a38e571bd4f4f289ad5be3f299903461e9 (patch) | |
| tree | a5fe8fc80de75b46a3aa3bbc14226c82aa54735a /src/kex.c | |
| parent | 56f86cd4a1d774353b2095aebfdbdd73fa4276ba (diff) | |
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){ |
