summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controller.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c
index e6f95b6..f6a9388 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -215,11 +215,12 @@ static void __thread_write_image_file(void *data, Ecore_Thread *th)
}
pthread_mutex_lock(&ad->mutex);
- free(ad->latest_encoded_image_buffer);
+ unsigned char *temp = ad->latest_encoded_image_buffer;
ad->latest_encoded_image_buffer = encoded_buffer;
ad->latest_encoded_image_buffer_size = encoded_size;
pthread_mutex_unlock(&ad->mutex);
+ free(temp);
free(image_info);
free(buffer);
}