Skip to content

Commit

Permalink
mesa: fix segfault caused by incorrect uv_timer_init
Browse files Browse the repository at this point in the history
  • Loading branch information
pkova committed Apr 6, 2024
1 parent 42ecff5 commit 1113971
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/vere/io/mesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,9 @@ _mesa_put_request(u3_mesa* sam_u, u3_mesa_name* nam_u, u3_pend_req* req_u) {
u3_pend_req* new_u = req_u;
if ( old_u == NULL ) {
new_u = u3a_calloc(1, sizeof(u3_pend_req));
// u3l_log("putting fresh req %p", new_u);
u3l_log("putting fresh req %p", new_u);
memcpy(new_u, req_u, sizeof(u3_pend_req));
uv_timer_init(u3L, &new_u->tim_u);
} else {
new_u = old_u;
memcpy(new_u, req_u, sizeof(u3_pend_req));
Expand Down Expand Up @@ -1695,7 +1696,6 @@ _mesa_req_pact_init(u3_mesa* sam_u, u3_mesa_pict* pic_u, u3_lane* lan_u)

req_u->nex_w = (c3y == lin_o) ? 1 : 0;
req_u->len_w = (c3y == lin_o) ? 1 : 0;
uv_timer_init(u3L, &req_u->tim_u);
req_u->lef_w = 0;
req_u->old_w = 0;
req_u->ack_w = 0;
Expand Down

0 comments on commit 1113971

Please sign in to comment.