ca_x509_serialize: don't leak the bio buffer; ok reyk@
authormarkus <markus@openbsd.org>
Mon, 5 May 2014 18:56:42 +0000 (18:56 +0000)
committermarkus <markus@openbsd.org>
Mon, 5 May 2014 18:56:42 +0000 (18:56 +0000)
sbin/iked/ca.c

index d6076f5..cb20531 100644 (file)
@@ -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);
 }