MT#55283 g_new for last user of uid_alloc

Change-Id: I33188c74a1da8daa5372e410602e8021426ca9df
pull/2171/head
Richard Fuchs 2 months ago
parent acda0b2180
commit 579097e812

@ -4178,11 +4178,6 @@ void play_buffered(struct jb_packet *cp) {
void interfaces_free(void) {
struct local_intf *ifc;
while ((ifc = i_queue_pop_head(&all_local_interfaces))) {
free(ifc->ice_foundation.s);
bufferpool_unref(ifc->stats);
}
t_hash_table_destroy(__logical_intf_name_family_hash);
__auto_type l_iter = t_hash_table_iter(__local_intf_addr_type_hash);
@ -4225,6 +4220,12 @@ void interfaces_free(void) {
}
}
while ((ifc = i_queue_pop_head(&all_local_interfaces))) {
free(ifc->ice_foundation.s);
bufferpool_unref(ifc->stats);
g_free(ifc);
}
t_hash_table_destroy_ptr(&local_media_socket_endpoints);
}

@ -258,7 +258,7 @@ void thread_create_looper(enum thread_looper_action (*f)(void), const char *sche
/*** ALLOC WITH UNIQUE ID HELPERS ***/
#define uid_alloc(q) ({ \
__typeof__((q)->__t) __ret = memory_arena_alloc0_lw(__typeof__(*(q)->__t)); \
__typeof__((q)->__t) __ret = g_new0(__typeof__(*(q)->__t), 1); \
__ret->unique_id = (q)->length; \
t_queue_push_tail(q, __ret); \
__ret; \

Loading…
Cancel
Save