Prechádzať zdrojové kódy

core: dns cache - destroy the item directly on remove

Daniel-Constantin Mierla 1 mesiac pred
rodič
commit
fee8356164
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  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,
 		LM_DBG("item %p with high refcnt %d (%s:%u)\n", e,
 				atomic_get_int(&e->refcnt), fpath, line);
 				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__)
 #define _dns_hash_remove(e) _dns_hash_remove_entry(e, __FILE__, __LINE__)