From f97d56e8e7d27d73e518ca4a164f0d9d61dbe9cc Mon Sep 17 00:00:00 2001 From: Owen Carter Date: Mon, 10 May 2021 23:53:02 +0200 Subject: [PATCH] face detect fix (#108) Fixes #107; heap corruption and crash happening with ESP 1.0.6 when face detection is enabled. --- app_httpd.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app_httpd.cpp b/app_httpd.cpp index 88a77be..d810463 100644 --- a/app_httpd.cpp +++ b/app_httpd.cpp @@ -398,10 +398,6 @@ static esp_err_t capture_handler(httpd_req_t *req){ face_id = run_face_recognition(image_matrix, net_boxes); } draw_face_boxes(image_matrix, net_boxes, face_id); - free(net_boxes->score); - free(net_boxes->box); - free(net_boxes->landmark); - free(net_boxes); } jpg_chunking_t jchunk = {req, 0}; @@ -513,10 +509,6 @@ static esp_err_t stream_handler(httpd_req_t *req){ } fr_recognize = esp_timer_get_time(); draw_face_boxes(image_matrix, net_boxes, face_id); - free(net_boxes->score); - free(net_boxes->box); - free(net_boxes->landmark); - free(net_boxes); } if(!fmt2jpg(image_matrix->item, fb->width*fb->height*3, fb->width, fb->height, PIXFORMAT_RGB888, 90, &_jpg_buf, &_jpg_buf_len)){ Serial.println("fmt2jpg failed");