mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +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 *)(
|
||||
malloc(sizeof(WifiConnectedState)));
|
||||
if (!connected) {
|
||||
free(resp_payload);
|
||||
ESP_LOGE(TAG, "Error allocating memory");
|
||||
return ESP_ERR_NO_MEM;
|
||||
}
|
||||
|
Reference in New Issue
Block a user