aboutsummaryrefslogtreecommitdiff
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 11:44:34 +0100
commit2c66eeaf75093b8c5babd114b7737b4daaa34b26 (patch)
treea84908de16be357844a5eb90cdeb34dafd174e4e
parent91edc0ee217aa3e6735c5b8c7415b641c1969e2d (diff)
downloadlibssh-2c66eeaf75093b8c5babd114b7737b4daaa34b26.tar.gz
libssh-2c66eeaf75093b8c5babd114b7737b4daaa34b26.tar.xz
libssh-2c66eeaf75093b8c5babd114b7737b4daaa34b26.zip
pki: Fix a memory leak.
CID #1132819
-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);