From 8756eb73ed0ad5829dcdf267d55e15de3927ac3f Mon Sep 17 00:00:00 2001 From: Sachin Parekh Date: Fri, 4 Jan 2019 11:22:24 +0530 Subject: [PATCH] examples: Free image_matrix on fmt2rgb888 failure Signed-off-by: Sachin Parekh --- .../single_chip/detection_with_command_line/main/app_facenet.c | 1 + .../single_chip/recognition_with_command_line/main/app_facenet.c | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/single_chip/detection_with_command_line/main/app_facenet.c b/examples/single_chip/detection_with_command_line/main/app_facenet.c index a3f87e9..95e2f60 100644 --- a/examples/single_chip/detection_with_command_line/main/app_facenet.c +++ b/examples/single_chip/detection_with_command_line/main/app_facenet.c @@ -72,6 +72,7 @@ void task_process (void *arg) if (true != res) { ESP_LOGE(TAG, "fmt2rgb888 failed, fb: %d", fb->len); + dl_matrix3du_free(image_matrix); continue; } diff --git a/examples/single_chip/recognition_with_command_line/main/app_facenet.c b/examples/single_chip/recognition_with_command_line/main/app_facenet.c index aa881d9..9cf5ebe 100644 --- a/examples/single_chip/recognition_with_command_line/main/app_facenet.c +++ b/examples/single_chip/recognition_with_command_line/main/app_facenet.c @@ -101,6 +101,7 @@ void task_process(void *arg) if (true != res) { ESP_LOGE(TAG, "fmt2rgb888 failed, fb: %d", fb->len); + dl_matrix3du_free(image_matrix); continue; }