summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsalt.jeong <salt.jeong@samsung.com>2019-09-06 11:31:59 +0900
committersalt.jeong <salt.jeong@samsung.com>2019-09-06 11:31:59 +0900
commitc0db36d6627c2a5af0e471173f10d55cc0c466bb (patch)
tree329ecf930adc9a20d9ab719a73cd1f09766fe2f4 /src
parent15b7a74ee2480c9b7340aba088519a71d61a8c5b (diff)
downloadsmart-surveillance-camera-c0db36d6627c2a5af0e471173f10d55cc0c466bb.tar.gz
smart-surveillance-camera-c0db36d6627c2a5af0e471173f10d55cc0c466bb.tar.bz2
smart-surveillance-camera-c0db36d6627c2a5af0e471173f10d55cc0c466bb.zip
Free image buffer outside
Change-Id: I1283394ca56d1f3c817e6c3596223c5bc0090909
Diffstat (limited to 'src')
-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);
}