mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wifi_provisioning: Fix some memory leak issues by coverity static analyzer.
This commit is contained in:
parent
c9f2790474
commit
d734c533a5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user