瀏覽代碼

core: dns cache - destroy the item directly on remove

Daniel-Constantin Mierla 2 月之前
父節點
當前提交
fee8356164
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/core/dns_cache.c

+ 2 - 1
src/core/dns_cache.c

@@ -508,7 +508,8 @@ inline static void _dns_hash_remove_entry(
 		LM_DBG("item %p with high refcnt %d (%s:%u)\n", e,
 				atomic_get_int(&e->refcnt), fpath, line);
 	}
-	dns_hash_put(e);
+	/* item unlinked - destroy it */
+	dns_destroy_entry(e);
 }
 
 #define _dns_hash_remove(e) _dns_hash_remove_entry(e, __FILE__, __LINE__)