From 68f58d7401604a7ee1f1cbf276967bad390b41c6 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 11 May 2020 18:03:40 +0000 Subject: api: use malloc for rx thread arg instead of heap Type: fix Avoids issues if thread with non-zero __os_thread_index attaches to binary api. Signed-off-by: Florin Coras Change-Id: Ib981f12c867fdee7590391ec43128145bb1abce6 --- src/vlibmemory/memory_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c index c6bfb6f8635..64650b64eca 100644 --- a/src/vlibmemory/memory_client.c +++ b/src/vlibmemory/memory_client.c @@ -63,7 +63,7 @@ rx_thread_fn (void *arg) vlibapi_set_main (a->am); vlibapi_set_memory_client_main (a->mm); - clib_mem_free (a); + free (a); mm = vlibapi_get_memory_client_main (); q = vlibapi_get_main ()->vl_input_queue; @@ -428,7 +428,7 @@ connect_to_vlib_internal (const char *svm_name, if (thread_fn == rx_thread_fn) { rx_thread_fn_arg_t *arg; - arg = clib_mem_alloc (sizeof (*arg)); + arg = malloc (sizeof (*arg)); arg->am = vlibapi_get_main (); arg->mm = vlibapi_get_memory_client_main (); thread_fn_arg = (void *) arg; -- cgit 1.2.3-korg