]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
free dstkey
authorMark Andrews <marka@isc.org>
Thu, 9 Dec 2010 01:17:46 +0000 (01:17 +0000)
committerMark Andrews <marka@isc.org>
Thu, 9 Dec 2010 01:17:46 +0000 (01:17 +0000)
omapip/auth.c

index b62e9088cd8adb5089d13f3b47f983202d637292..fee416ec8904318882119dc742614d3ab0ddba28 100644 (file)
@@ -115,13 +115,10 @@ isc_result_t omapi_auth_key_enter (omapi_auth_key_t *a)
        if (status == ISC_R_SUCCESS) {
                status = dns_tsec_create(dhcp_gbl_ctx.mctx, dns_tsectype_tsig,
                                         &dstkey, &a->tsec_key);
+               dst_key_free(&dstkey);
        }
-       if (status != ISC_R_SUCCESS) {
-               if (dstkey != NULL) {
-                       dst_key_free(&dstkey);
-               }
+       if (status != ISC_R_SUCCESS)
                log_error("Unable to create tsec structure for %s", a->name);
-       }
 
        omapi_auth_key_hash_add (auth_key_hash, a -> name, 0, a, MDL);
        return ISC_R_SUCCESS;