summaryrefslogtreecommitdiff
path: root/omapip/auth.c
diff options
context:
space:
mode:
authorMark Andrews <marka@isc.org>2010-12-09 01:17:46 +0000
committerMark Andrews <marka@isc.org>2010-12-09 01:17:46 +0000
commit51c8829ca2f0ca457da0c1df2421c1aaadb15958 (patch)
tree79c8945eda870485aa1fecb9c301c74481a829ab /omapip/auth.c
parent01910481cd40958a03bdc9569eddd4bccb172eca (diff)
downloadisc-dhcp-51c8829ca2f0ca457da0c1df2421c1aaadb15958.tar.gz
free dstkey
Diffstat (limited to 'omapip/auth.c')
-rw-r--r--omapip/auth.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/omapip/auth.c b/omapip/auth.c
index b62e9088..fee416ec 100644
--- a/omapip/auth.c
+++ b/omapip/auth.c
@@ -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;