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

This commit is contained in:
aditi_lonkar 2021-12-02 12:59:24 +05:30
parent 88645a97b4
commit b67821b2a7

View File

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