+3866. [bug] Named could die on disk full in generate_session_key.
+ [RT #36119]
+
3865. [test] Improved testability of the red-black tree
implementation and added unit tests. [RT #35904]
(int) isc_buffer_usedlength(&key_txtbuffer),
(char*) isc_buffer_base(&key_txtbuffer));
- RUNTIME_CHECK(isc_stdio_flush(fp) == ISC_R_SUCCESS);
- RUNTIME_CHECK(isc_stdio_close(fp) == ISC_R_SUCCESS);
+ CHECK(isc_stdio_flush(fp));
+ CHECK(isc_stdio_close(fp));
dst_key_free(&key);
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed to generate session key "
"for dynamic DNS: %s", isc_result_totext(result));
+ if (fp != NULL) {
+ if (isc_file_exists(filename))
+ (void)isc_file_remove(filename);
+ (void)isc_stdio_close(fp);
+ }
if (tsigkey != NULL)
dns_tsigkey_detach(&tsigkey);
if (key != NULL)