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 <fcoras@cisco.com> Change-Id: Ib981f12c867fdee7590391ec43128145bb1abce6
This commit is contained in:
committed by
Dave Barach
parent
69d97256d5
commit
68f58d7401
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user