examples: Free image_matrix on fmt2rgb888 failure

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
pull/20/head
Sachin Parekh 2019-01-04 11:22:24 +05:30 committed by XiaochaoGONG
parent 191637e180
commit 8756eb73ed
2 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,7 @@ void task_process (void *arg)
if (true != res) if (true != res)
{ {
ESP_LOGE(TAG, "fmt2rgb888 failed, fb: %d", fb->len); ESP_LOGE(TAG, "fmt2rgb888 failed, fb: %d", fb->len);
dl_matrix3du_free(image_matrix);
continue; continue;
} }

View File

@ -101,6 +101,7 @@ void task_process(void *arg)
if (true != res) if (true != res)
{ {
ESP_LOGE(TAG, "fmt2rgb888 failed, fb: %d", fb->len); ESP_LOGE(TAG, "fmt2rgb888 failed, fb: %d", fb->len);
dl_matrix3du_free(image_matrix);
continue; continue;
} }