aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-10-07 21:53:37 +0200
committerAndreas Schneider <asn@cryptomilk.org>2012-10-07 21:53:37 +0200
commit3db2ac41eb85a82d017bd60295a71b8cc9dfbecb (patch)
treee7c2af26585d59f2925648cc3eff83adbe5d6bf8 /src
parentca74d91d503da30c59b00e5bc3e0ee209dd83ebd (diff)
downloadlibssh-3db2ac41eb85a82d017bd60295a71b8cc9dfbecb.tar.gz
libssh-3db2ac41eb85a82d017bd60295a71b8cc9dfbecb.tar.xz
libssh-3db2ac41eb85a82d017bd60295a71b8cc9dfbecb.zip
pki: Handle error of pki_import_pubkey_buffer() correctly.
Diffstat (limited to 'src')
-rw-r--r--src/pki.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pki.c b/src/pki.c
index af824ea6..de8d72b0 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -648,9 +648,11 @@ static int pki_import_pubkey_buffer(ssh_buffer buffer,
}
rc = pki_pubkey_build_ecdsa(key, nid, e);
-
ssh_string_burn(e);
ssh_string_free(e);
+ if (rc < 0) {
+ goto fail;
+ }
}
break;
#endif