diff --git a/dump1090.c b/dump1090.c index 7c40508..d5c3111 100644 --- a/dump1090.c +++ b/dump1090.c @@ -709,6 +709,7 @@ int main(int argc, char **argv) { } sdrClose(); + fifo_destroy(); if (Modes.exit == 1) { log_with_timestamp("Normal exit."); diff --git a/fifo.c b/fifo.c index 15f4f78..f7675f2 100644 --- a/fifo.c +++ b/fifo.c @@ -83,10 +83,10 @@ static void free_buffer_list(struct mag_buf *head) void fifo_destroy() { free_buffer_list(fifo_head); - fifo_freelist = NULL; + fifo_head = fifo_tail = NULL; free_buffer_list(fifo_freelist); - fifo_head = fifo_tail = NULL; + fifo_freelist = NULL; free(overlap_buffer); overlap_buffer = NULL;