From 9f4681dc57060902a7efd7a91f3a4b4549584fa3 Mon Sep 17 00:00:00 2001 From: Adonis Najimi Date: Mon, 14 May 2018 22:32:57 +0200 Subject: [PATCH] free installer's queue --- app/src/installer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/installer.c b/app/src/installer.c index 8c2c6814..7863b97c 100644 --- a/app/src/installer.c +++ b/app/src/installer.c @@ -25,7 +25,11 @@ SDL_bool apk_queue_init(struct apk_queue *queue) { } void apk_queue_destroy(struct apk_queue *queue) { - // do nothing as we are on the stack + int i = queue->tail; + while (i != queue->head) { + SDL_free(queue->data[i]); + i = (i + 1) % APK_QUEUE_SIZE; + } } SDL_bool apk_queue_push(struct apk_queue *queue, const char *apk) {