]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fixup memleak on error.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Sep 2016 12:05:45 +0000 (14:05 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Sep 2016 12:05:45 +0000 (14:05 +0200)
Changelog
keys.c

index eb03feb4568523f3d0e2b5d79fabd9fe18ce43e5..5d2a19201b7276a855ee96739859508927f43bc6 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -66,11 +66,13 @@ TBD
        * Prepare for ED25519, ED448 support: todo convert* routines in
          dnssec.h, once openssl has support for signing with these algorithms.
          The dns algorithm number is not yet allocated. These features are
-         not fully implemented yet.
+         not fully implemented yet, openssl (1.1) does not support the
+         algorithms enough to generate keys and sign and verify with them.
        * Fix _answerfrom comment in ldns_struct_pkt.
        * Fix drill axfr ipv4/ipv6 queries.
        * Fix comment referring to mk_query in packet.h to pkt_query_new.
        * Fix description of QR flag in packet.h.
+       * Fix for openssl 1.1.0 API changes.
 
 1.6.17 2014-01-10
        * Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a
diff --git a/keys.c b/keys.c
index cf779f90603c7ac9318691b2abd53316d5c36416..340d8d27e801a4bba4f4c7366e9d1341668ab8a4 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -888,8 +888,13 @@ ldns_key_new_frm_fp_rsa_l(FILE *f, int *line_nr)
 #else
        if(!RSA_set0_key(rsa, n, e, d))
                goto error;
+       n = NULL;
+       e = NULL;
+       d = NULL;
        if(!RSA_set0_factors(rsa, p, q))
                goto error;
+       p = NULL;
+       q = NULL;
        if(!RSA_set0_crt_params(rsa, dmp1, dmq1, iqmp))
                goto error;
 #endif
@@ -998,6 +1003,9 @@ ldns_key_new_frm_fp_dsa_l(FILE *f, ATTR_UNUSED(int *line_nr))
 #else
        if(!DSA_set0_pqg(dsa, p, q, g))
                goto error;
+       p = NULL;
+       q = NULL;
+       g = NULL;
        if(!DSA_set0_key(dsa, pub_key, priv_key))
                goto error;
 #endif