RT3861: Mem/bio leak in req command
authorHanno Böck <hanno@hboeck.de>
Mon, 25 May 2015 20:18:07 +0000 (16:18 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 25 May 2015 23:13:26 +0000 (19:13 -0400)
The "out" variable is used for both key and csr.  Close it after
writing the first one so it can be re-used when writing the other.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
apps/req.c

index 8acdad350d7ae01f875594498e5d1694b7382104..5514ee351da7a6101b2117663897bb373e9a5c0e 100644 (file)
@@ -612,6 +612,7 @@ int req_main(int argc, char **argv)
             }
             goto end;
         }
+        BIO_free(out);
         BIO_printf(bio_err, "-----\n");
     }