Skip to content

Commit

Permalink
Fixed uncalled destructors on destruction of queue
Browse files Browse the repository at this point in the history
  • Loading branch information
geky committed Jun 24, 2016
1 parent 073fafb commit 6830476
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions events.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ int equeue_create_inplace(struct equeue *q, unsigned size, void *buffer) {
}

void equeue_destroy(struct equeue *q) {
while (q->queue) {
struct event *e = q->queue;
q->queue = e->next;
event_dealloc(q, e+1);
}

events_mutex_destroy(&q->freelock);
events_mutex_destroy(&q->queuelock);
events_sema_destroy(&q->eventsema);
Expand Down

0 comments on commit 6830476

Please sign in to comment.