diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index 5476ef391f..5eea5cb6b9 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -1852,7 +1852,6 @@ dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl, mctx, rdatabuf, &lookup->callbacks); if (result != ISC_R_SUCCESS) { isc_buffer_free(&rdatabuf); - result = DNS_R_SERVFAIL; } if (size >= 65535) { break; @@ -1864,6 +1863,7 @@ dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl, } while (result == ISC_R_NOSPACE); if (result != ISC_R_SUCCESS) { + result = DNS_R_SERVFAIL; goto failure; }