aboutsummaryrefslogtreecommitdiff
path: root/src/pki.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pki.c')
-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