Patch: Elm ME+ 2.5 PLalpha54 -> Elm ME+ 2.5 PLalpha60 [8/13] (2/4)
From
Kari Hurtta@21:1/5 to
All on Thu Nov 24 20:29:04 2022
[continued from previous message]
if ((*ptr)->refcount > 0) {
/* Just reset this reference */
*ptr = NULL;
return;
}
if ((*ptr)->name) {
free((*ptr)->name);
(*ptr)->name = NULL;
}
!
if ((*ptr)->query_buffer)
free_resolv_message(& ((*ptr)->query_buffer));
--- 963,1004 ----
panic("RESOLV PANIC",__FILE__,__LINE__,
"free_resolv_query_item",
"Bad magic number (resolv_query_item)",0);
+
+ SIGDPRINT(Debug,16,(&Debug,
+ "free_resolv_query_item: [%p] querynum=%zu, refcount=%d\n",
+ *ptr,(*ptr)->querynum,(*ptr)->refcount));
+
if ((*ptr)->refcount < 1)
panic("RESOLV PANIC",__FILE__,__LINE__,"free_resolv_query_item",
"Bad refcount",0);
(*ptr)->refcount--;
+
+ SIGDPRINT(Debug,16,(&Debug,
+ "free_resolv_query_item: [%p] refcount => %d",
+ *ptr,(*ptr)->refcount));
+
if ((*ptr)->refcount > 0) {
/* Just reset this reference */
+
+ SIGDPRINT(Debug,16,(&Debug,", returning\n"));
*ptr = NULL;
return;
}
+ SIGDPRINT(Debug,16,(&Debug,", freeing"));
+
if ((*ptr)->name) {
+ SIGDPRINT(Debug,16,(&Debug,", name=%s",
+ (*ptr)->name));
free((*ptr)->name);
(*ptr)->name = NULL;
}
!
! SIGDPRINT(Debug,16,(&Debug,"\n"));
!