Skip to content

Commit 09cff0e

Browse files
author
Arto Kinnunen
authored
Fix uninitialised memory defect found by valgrind (#1582)
Fix "Conditional jump or move depends on uninitialised value(s)" by initializing eiid after allocation.
1 parent a1acffc commit 09cff0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/6LoWPAN/Thread/thread_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ void thread_child_id_request_info_init(thread_pending_child_id_req_t *child_info
717717
thread_pending_child_id_req_t *thread_child_id_request_allocate(void)
718718
{
719719
thread_pending_child_id_req_t *req = ns_dyn_mem_alloc(sizeof(thread_pending_child_id_req_t));
720+
memset(req->eiid, 0 , 8);
720721
thread_child_id_request_info_init(req);
721722
return req;
722723
}

0 commit comments

Comments
 (0)