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:
Ben Chan
2018-07-02 22:57:26 -07:00
committed by Bjorn Andersson
parent 0ba75091ab
commit eb666db04e

View File

@@ -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++;