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 dfcaf38..5fd906a 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");