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

This commit is contained in:
aditi_lonkar 2021-03-23 11:59:34 +05:30
parent 903f7bb99f
commit 53f5b64887

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;