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 8acdad3..5514ee3 100644 (file)
@@ -612,6 +612,7 @@ int req_main(int argc, char **argv)
             }
             goto end;
         }
             }
             goto end;
         }
+        BIO_free(out);
         BIO_printf(bio_err, "-----\n");
     }
 
         BIO_printf(bio_err, "-----\n");
     }