coverity 1464212, 1464214 & 1464215: Resource leaks
authorPauli <paul.dale@oracle.com>
Sun, 14 Jun 2020 22:11:13 +0000 (08:11 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 17 Jun 2020 05:59:58 +0000 (15:59 +1000)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/12149)

apps/dsaparam.c

index dfcaf38ca9f3244c82f043d264013d2a0abf30e3..5fd906a0693772b977474003df3704d4b1ecba42 100644 (file)
@@ -212,6 +212,9 @@ int dsaparam_main(int argc, char **argv)
         print_bignum_var(bio_out, p, "dsap", bits_p, data);
         print_bignum_var(bio_out, q, "dsaq", bits_p, data);
         print_bignum_var(bio_out, g, "dsag", bits_p, data);
+        BN_free(p);
+        BN_free(q);
+        BN_free(g);
         BIO_printf(bio_out, "    DSA *dsa = DSA_new();\n"
                             "    BIGNUM *p, *q, *g;\n"
                             "\n");