mirror of
https://github.com/linux-msm/qrtr.git
synced 2026-02-25 13:11:26 -08:00
qrtr-ns: initialize waiter_ticket struct in waiter_wait_timeout()
waiter_wait_timeout() doesn't initialize the 'callback' and 'updated' fields of the waiter_ticket struct. The 'updated' field may contain some garbage value, which is later read in waiter_ticket_check(). Signed-off-by: Ben Chan <benchan@chromium.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
0ba75091ab
commit
eb666db04e
@@ -266,6 +266,7 @@ int waiter_wait_timeout(struct waiter *w, unsigned int ms)
|
||||
struct waiter_ticket ticket;
|
||||
int rc;
|
||||
|
||||
memset(&ticket, 0, sizeof(ticket));
|
||||
waiter_ticket_set_timeout(&ticket, ms);
|
||||
list_append(&w->tickets, &ticket.list_item);
|
||||
w->count++;
|
||||
|
||||
Reference in New Issue
Block a user