Skip to content

Commit

Permalink
Fix freeing a null stream address
Browse files Browse the repository at this point in the history
Closes #13.
  • Loading branch information
hirrolot committed Jan 17, 2024
1 parent 0327ad3 commit a678684
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ static void Client_drop(VSelf) {
VSELF(Client);

for (size_t i = 0; i < MAX_STREAMS; i++) {
VCALL(self->streams[i].ctx, drop);
if (self->streams[i].ctx.vptr != NULL) {
VCALL(self->streams[i].ctx, drop);
}
}

free(self);
Expand Down

0 comments on commit a678684

Please sign in to comment.