diff options
-rw-r--r-- | src/c/queue.c | 5 | ||||
-rw-r--r-- | src/c/urweb.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/c/queue.c b/src/c/queue.c index cdd871b8..645f69e3 100644 --- a/src/c/queue.c +++ b/src/c/queue.c @@ -29,8 +29,11 @@ static void enqueue(int fd) { static int dequeue() { int ret = front->fd; + node n = front->next; + free(front); + + front = n; - front = front->next; if (!front) back = NULL; diff --git a/src/c/urweb.c b/src/c/urweb.c index 91c6f6b3..392108fe 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -552,10 +552,12 @@ void uw_free(uw_context ctx) { for (i = 0; i < ctx->n_deltas; ++i) buf_free(&ctx->deltas[i].msgs); + free(ctx->deltas); for (i = 0; i < ctx->n_globals; ++i) if (ctx->globals[i].free) ctx->globals[i].free(ctx->globals[i].data); + free(ctx->globals); free(ctx); } |