From b67821b2a7890986491b6fabb1cf4825eb793b1b Mon Sep 17 00:00:00 2001 From: aditi_lonkar Date: Thu, 2 Dec 2021 12:59:24 +0530 Subject: [PATCH] wifi_provisioning: Fix some memory leak issues by coverity static analyzer. --- components/wifi_provisioning/src/wifi_config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/wifi_provisioning/src/wifi_config.c b/components/wifi_provisioning/src/wifi_config.c index 93e3e85643..165c3f05df 100644 --- a/components/wifi_provisioning/src/wifi_config.c +++ b/components/wifi_provisioning/src/wifi_config.c @@ -83,6 +83,7 @@ static esp_err_t cmd_get_status_handler(WiFiConfigPayload *req, malloc(sizeof(WifiConnectedState))); if (!connected) { ESP_LOGE(TAG, "Error allocating memory"); + free(resp_payload); return ESP_ERR_NO_MEM; } resp_payload->connected = connected;