PR: 2908
authorDr. Stephen Henson <steve@openssl.org>
Wed, 21 Nov 2012 14:02:21 +0000 (14:02 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 21 Nov 2012 14:02:21 +0000 (14:02 +0000)
Submitted by: Dmitry Belyavsky <beldmit@gmail.com>

Fix DH double free if parameter generation fails.

apps/dhparam.c

index b47097cbb223e035fc85c970de34687967aa1fad..1297d6fb5ec9bf391c487436dd1b07bbeb4bb8a6 100644 (file)
@@ -332,7 +332,6 @@ bad:
                        BIO_printf(bio_err,"This is going to take a long time\n");
                        if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb))
                                {
-                               if(dh) DH_free(dh);
                                ERR_print_errors(bio_err);
                                goto end;
                                }