mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 03:07:21 +02:00
wifi_provisioning: Fix some memory leak issues by coverity static analyzer.
This commit is contained in:
@ -82,6 +82,7 @@ static esp_err_t cmd_get_status_handler(WiFiConfigPayload *req,
|
|||||||
WifiConnectedState *connected = (WifiConnectedState *)(
|
WifiConnectedState *connected = (WifiConnectedState *)(
|
||||||
malloc(sizeof(WifiConnectedState)));
|
malloc(sizeof(WifiConnectedState)));
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
|
free(resp_payload);
|
||||||
ESP_LOGE(TAG, "Error allocating memory");
|
ESP_LOGE(TAG, "Error allocating memory");
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user