free key on error

(cherry picked from commit 607c2d7441)
This commit is contained in:
Mark Andrews 2018-10-19 19:23:39 +11:00
parent d56d6db639
commit 36a0bf14e9

View file

@ -877,6 +877,9 @@ dst_key_fromgssapi(dns_name_t *name, gss_ctx_id_t gssctx, isc_mem_t *mctx,
*keyp = key;
result = ISC_R_SUCCESS;
out:
if (result != ISC_R_SUCCESS) {
dst_key_free(&key);
}
return result;
}