From d8d5679c8e722805f8b4be523f9c6176e335ca0a Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 28 Oct 2017 19:47:56 +0200 Subject: [PATCH] fix segfault in delete_fluid_ringbuffer() --- src/utils/fluid_ringbuffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/fluid_ringbuffer.c b/src/utils/fluid_ringbuffer.c index e276c04e..512c95a3 100644 --- a/src/utils/fluid_ringbuffer.c +++ b/src/utils/fluid_ringbuffer.c @@ -84,6 +84,9 @@ new_fluid_ringbuffer (int count, int elementsize) void delete_fluid_ringbuffer (fluid_ringbuffer_t *queue) { + if(queue != NULL) + { FLUID_FREE (queue->array); FLUID_FREE (queue); + } }