diff --git a/dap-sdk/core/include/dap_list.h b/dap-sdk/core/include/dap_list.h index f8bac72633536439f1a86c2ca856b21f4c7fc606..67cab4c15e2379209e2351488925991ae78fb484 100755 --- a/dap-sdk/core/include/dap_list.h +++ b/dap-sdk/core/include/dap_list.h @@ -104,7 +104,8 @@ dap_slist_elm_t *l_elm; a_slist->tail = NULL; /* Reset tail to NULL */ *a_data = l_elm->data; - *a_datasz = l_elm->datasz; + if ( a_datasz ) + *a_datasz = l_elm->datasz; DAP_FREE(l_elm); /* Release memory has been allocated for the queue's element */