Skip to content

Commit

Permalink
free iov on reset (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke authored Aug 12, 2024
1 parent 535a27e commit e60fd1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sources/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ od_frontend_attach(od_client_t *client, char *context,
(int)sizeof(server->id.id_prefix), server->id.id);

assert(od_server_synchronized(server));
assert(server->relay.iov == 0 ||
!machine_iov_pending(server->relay.iov));

/* connect to server, if necessary */
if (server->io.io) {
Expand Down
5 changes: 5 additions & 0 deletions sources/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ int od_reset(od_server_t *server)
goto error;
}

if (server->relay.iov) {
machine_iov_free(server->relay.iov);
server->relay.iov = NULL;
}

/* ready */
return 1;
drop:
Expand Down

0 comments on commit e60fd1e

Please sign in to comment.