diff options
author | salt.jeong <salt.jeong@samsung.com> | 2019-09-06 11:31:59 +0900 |
---|---|---|
committer | salt.jeong <salt.jeong@samsung.com> | 2019-09-06 11:31:59 +0900 |
commit | c0db36d6627c2a5af0e471173f10d55cc0c466bb (patch) | |
tree | 329ecf930adc9a20d9ab719a73cd1f09766fe2f4 | |
parent | 15b7a74ee2480c9b7340aba088519a71d61a8c5b (diff) | |
download | smart-surveillance-camera-c0db36d6627c2a5af0e471173f10d55cc0c466bb.tar.gz smart-surveillance-camera-c0db36d6627c2a5af0e471173f10d55cc0c466bb.tar.bz2 smart-surveillance-camera-c0db36d6627c2a5af0e471173f10d55cc0c466bb.zip |
Free image buffer outside
Change-Id: I1283394ca56d1f3c817e6c3596223c5bc0090909
-rw-r--r-- | src/controller.c | 3 |
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); } |