From 6492a6f905075fa73d911c345fe784f2d3c085e5 Mon Sep 17 00:00:00 2001 From: Henning Westerholt Date: Wed, 29 Mar 2023 09:50:20 +0000 Subject: [PATCH] pike: use pkg_malloc/pkg_free instead of system malloc --- src/modules/pike/pike_top.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/pike/pike_top.c b/src/modules/pike/pike_top.c index 6940e84ca67..c7894604b66 100644 --- a/src/modules/pike/pike_top.c +++ b/src/modules/pike/pike_top.c @@ -79,10 +79,10 @@ int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned int expires, pike_node_status_t status ) { struct TopListItem_t *new_item - = (struct TopListItem_t *)malloc(sizeof(struct TopListItem_t)); + = (struct TopListItem_t *)pkg_malloc(sizeof(struct TopListItem_t)); if(!new_item) { - SYS_MEM_ERROR; + PKG_MEM_ERROR; return -1; } print_addr(ip_addr, addr_len); @@ -119,7 +119,7 @@ void pike_top_list_clear() top_list_iter = top_list_root; while (top_list_iter) { ptr = top_list_iter->next; - free(top_list_iter); + pkg_free(top_list_iter); top_list_iter = ptr; } top_list_root = 0;