And unbound should be built with both --enable-cachedb and
--with-libhiredis[=PATH] (where $PATH/include/hiredis/hiredis.h
should exist). Patch from Jinmei Tatuya (Infoblox).
+ - Fix #3817: core dump happens in libunbound delete, when queued
+ servfail hits deleted message queue.
13 March 2018: Wouter
- Fix typo in documentation.
/* cleanup */
m = UB_LIBCMD_QUIT;
+ w->want_quit = 1;
tube_remove_bg_listen(w->ctx->qq_pipe);
tube_remove_bg_write(w->ctx->rr_pipe);
libworker_delete(w);
uint8_t* msg = NULL;
uint32_t len = 0;
+ if(w->want_quit) {
+ context_query_delete(q);
+ return;
+ }
/* serialize and delete unneeded q */
if(w->is_bg_thread) {
lock_basic_lock(&w->ctx->cfglock);
int is_bg;
/** is this a bg worker that is threaded (not forked)? */
int is_bg_thread;
+ /** want to quit, stop handling new content */
+ int want_quit;
/** copy of the module environment with worker local entries. */
struct module_env* env;
int tube_queue_item(struct tube* tube, uint8_t* msg, size_t len)
{
- struct tube_res_list* item =
- (struct tube_res_list*)malloc(sizeof(*item));
+ struct tube_res_list* item;
+ if(!tube || !tube->res_com) return 0;
+ item = (struct tube_res_list*)malloc(sizeof(*item));
if(!item) {
free(msg);
log_err("out of memory for async answer");
int tube_queue_item(struct tube* tube, uint8_t* msg, size_t len)
{
- struct tube_res_list* item =
- (struct tube_res_list*)malloc(sizeof(*item));
+ struct tube_res_list* item;
+ if(!tube) return 0;
+ item = (struct tube_res_list*)malloc(sizeof(*item));
verbose(VERB_ALGO, "tube queue_item len %d", (int)len);
if(!item) {
free(msg);