summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2014-05-05 18:56:42 +0000
committermarkus <markus@openbsd.org>2014-05-05 18:56:42 +0000
commit6dee7b11aea398e94580db1d0c01779f5f574142 (patch)
treedc2d22433c27204a339d85e826d0fa0d96225d80
parentmake the ca_pubkey_serialize() code similar to the private key code, and (diff)
downloadwireguard-openbsd-6dee7b11aea398e94580db1d0c01779f5f574142.tar.xz
wireguard-openbsd-6dee7b11aea398e94580db1d0c01779f5f574142.zip
ca_x509_serialize: don't leak the bio buffer; ok reyk@
-rw-r--r--sbin/iked/ca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c
index d6076f561fc..cb20531c71b 100644
--- a/sbin/iked/ca.c
+++ b/sbin/iked/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.28 2014/05/05 18:54:17 markus Exp $ */
+/* $OpenBSD: ca.c,v 1.29 2014/05/05 18:56:42 markus Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -784,6 +784,7 @@ ca_x509_serialize(X509 *x509)
len = BIO_get_mem_data(out, &d);
buf = ibuf_new(d, len);
+ BIO_free(out);
return (buf);
}