From 7ec6d91a88cd96dc06f7054227a948c7a4fccf90 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 1 Apr 2024 15:02:03 -0400 Subject: [PATCH] MT#55283 use bufferpool for interface stats Change-Id: Ic3d7892da067cf7a8fea44b3d6e7192e1b932264 --- daemon/media_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 0e770384f..cbb5a47a8 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -822,7 +822,7 @@ static void __interface_append(struct intf_config *ifa, sockfamily_t *fam, bool ifc->advertised_address = ifa->advertised_address; ifc->spec = spec; ifc->logical = lif; - ifc->stats = g_malloc0(sizeof(*ifc->stats)); + ifc->stats = bufferpool_alloc0(shm_bufferpool, sizeof(*ifc->stats)); g_queue_push_tail(&all_local_interfaces, ifc); @@ -3404,7 +3404,7 @@ void interfaces_free(void) { while ((ifc = g_queue_pop_head(&all_local_interfaces))) { free(ifc->ice_foundation.s); - g_free(ifc->stats); + bufferpool_unref(ifc->stats); g_slice_free1(sizeof(*ifc), ifc); }