Clear out the entire structure, not just the size of a pointer to it.
sys/dev/ocs/ocs_os.c: In ocs_thread_create(), use sizeof(*thread) (instead of sizeof(thread)) as the size argument to memset so that we clear out the entire thread structure instead of just a few bytes of it. Submitted by: jtl MFC after: 3 days
This commit is contained in:
parent
006e6f83df
commit
7820a12c47
@ -630,7 +630,7 @@ ocs_thread_create(ocs_os_handle_t os, ocs_thread_t *thread, ocs_thread_fctn fctn
|
||||
{
|
||||
int32_t rc = 0;
|
||||
|
||||
ocs_memset(thread, 0, sizeof(thread));
|
||||
ocs_memset(thread, 0, sizeof(*thread));
|
||||
|
||||
thread->fctn = fctn;
|
||||
thread->name = ocs_strdup(name);
|
||||
|
Loading…
Reference in New Issue
Block a user