refactor: replace psram allocations with standard heap
Signed-off-by: Bo <boironic@gmail.com>
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include "esp_log.h"
|
||||
#include "esp_http_client.h"
|
||||
#include "esp_crt_bundle.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "nvs.h"
|
||||
#include "cJSON.h"
|
||||
|
||||
@@ -256,9 +255,8 @@ esp_err_t tool_web_search_execute(const char *input_json, char *output, size_t o
|
||||
snprintf(path, sizeof(path),
|
||||
"/res/v1/web/search?q=%s&count=%d", encoded_query, SEARCH_RESULT_COUNT);
|
||||
|
||||
/* Allocate response buffer from PSRAM */
|
||||
search_buf_t sb = {0};
|
||||
sb.data = heap_caps_calloc(1, SEARCH_BUF_SIZE, MALLOC_CAP_SPIRAM);
|
||||
sb.data = calloc(1, SEARCH_BUF_SIZE);
|
||||
if (!sb.data) {
|
||||
snprintf(output, output_size, "Error: Out of memory");
|
||||
return ESP_ERR_NO_MEM;
|
||||
|
||||
Reference in New Issue
Block a user