Fix C code generate by 'openssl dsaparam -C'.
[openssl.git] / apps / dsaparam.c
index 517791620249a5bdd3e8eed37e8c8d0509a372bc..d3501c2606068861471f7ac750377f37681cb267 100644 (file)
@@ -338,7 +338,7 @@ bad:
                printf("\tdsa->g=BN_bin2bn(dsa%d_g,sizeof(dsa%d_g),NULL);\n",
                        bits_p,bits_p);
                printf("\tif ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))\n");
                printf("\tdsa->g=BN_bin2bn(dsa%d_g,sizeof(dsa%d_g),NULL);\n",
                        bits_p,bits_p);
                printf("\tif ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))\n");
-               printf("\t\treturn(NULL);\n");
+               printf("\t\t{ DSA_free(dsa); return(NULL); }\n");
                printf("\treturn(dsa);\n\t}\n");
                }
 
                printf("\treturn(dsa);\n\t}\n");
                }