]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence coverity warnings
authorMark Andrews <marka@isc.org>
Sat, 30 May 2015 07:44:52 +0000 (17:44 +1000)
committerMark Andrews <marka@isc.org>
Sat, 30 May 2015 07:44:52 +0000 (17:44 +1000)
lib/dns/openssldh_link.c
lib/dns/openssldsa_link.c

index ba39d1e969dde10394a660fffe8dc80bb32176ae..d41fee38b27c56724723a97fbf635bedbdbe9f42 100644 (file)
@@ -210,11 +210,12 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
                if (dh == NULL)
                        return (dst__openssl_toresult(ISC_R_NOMEMORY));
                cb = BN_GENCB_new();
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
                if (cb == NULL) {
                        DH_free(dh);
                        return (dst__openssl_toresult(ISC_R_NOMEMORY));
                }
-
+#endif
                if (callback == NULL) {
                        BN_GENCB_set_old(cb, NULL, NULL);
                } else {
index dce7cd34415f43233c9d620c09166e2a919be8a0..510e78e5ae36e299787fc36beb70ee86ad2bf99d 100644 (file)
@@ -377,12 +377,12 @@ openssldsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
        if (dsa == NULL)
                return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
        cb = BN_GENCB_new();
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
        if (cb == NULL) {
                DSA_free(dsa);
                return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
        }
-
-
+#endif
        if (callback == NULL) {
                BN_GENCB_set_old(cb, NULL, NULL);
        } else {