ocsp.c doesn't free the whole output chain, maybe causing a memory leak
[openssl.git] / apps / ocsp.c
index 4a68e52d743930f10ac53d6a07e5942f6fb8abe0..bd16a5b869935e4aeb4d7ec2e508b34c7716d4fb 100644 (file)
@@ -25,6 +25,7 @@ NON_EMPTY_TRANSLATION_UNIT
 
 /* Needs to be included before the openssl headers */
 # include "apps.h"
+# include "progs.h"
 # include <openssl/e_os2.h>
 # include <openssl/crypto.h>
 # include <openssl/err.h>
@@ -729,7 +730,7 @@ redo_accept:
     free_index(rdb);
     BIO_free_all(cbio);
     BIO_free_all(acbio);
-    BIO_free(out);
+    BIO_free_all(out);
     OCSP_REQUEST_free(req);
     OCSP_RESPONSE_free(resp);
     OCSP_BASICRESP_free(bs);