wifi_provisioning: Fix some memory leak issues by coverity static analyzer.

This commit is contained in:
aditi_lonkar 2021-03-23 11:10:36 +05:30
parent c9f2790474
commit d734c533a5

View File

@ -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;
}