aboutsummaryrefslogtreecommitdiff
path: root/src/pki.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-28 09:09:45 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-28 09:09:45 +0100
commitcdd7a6cb8df675d101920208c7b5ad70e5e42fd8 (patch)
treec2496adfe27e82901827b0a4915bedab1d8ba1a3 /src/pki.c
parent004240af486768927a16742c457f69217f39077f (diff)
downloadlibssh-cdd7a6cb8df675d101920208c7b5ad70e5e42fd8.tar.gz
libssh-cdd7a6cb8df675d101920208c7b5ad70e5e42fd8.tar.xz
libssh-cdd7a6cb8df675d101920208c7b5ad70e5e42fd8.zip
pki: Fix a memory leak.
CID #1132819
Diffstat (limited to 'src/pki.c')
-rw-r--r--src/pki.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pki.c b/src/pki.c
index 28a27d83..a1dbff4e 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -524,6 +524,7 @@ int ssh_pki_export_privkey_file(const ssh_key privkey,
}
rc = fwrite(ssh_string_data(blob), ssh_string_len(blob), 1, fp);
+ ssh_string_free(blob);
if (rc != 1 || ferror(fp)) {
fclose(fp);
unlink(filename);