[[ARHT][General][RDKB Eagle] Fix Coverity issue in wifi HAL.
[Description]
Fix coverity issue in wifi_getBandSteeringLog.
[Release-log]
N/A
diff --git a/src/logan_wifi/wifi_hal.c b/src/logan_wifi/wifi_hal.c
index f880e1d..2f231b8 100644
--- a/src/logan_wifi/wifi_hal.c
+++ b/src/logan_wifi/wifi_hal.c
@@ -15238,13 +15238,14 @@
INT currentLine = 0;
INT result = -1;
const char *filePath = "/etc/steer_db.txt";
- FILE *file = fopen(filePath, "r");
+ FILE *file = NULL;
if (!pSteeringTime || !pClientMAC || !pSourceSSIDIndex || !pDestSSIDIndex || !pSteeringReason) {
wifi_debug(DEBUG_ERROR, "Received variables are NULL\n");
return RETURN_ERR;
}
+ file = fopen(filePath, "r");
if (!file) {
wifi_debug(DEBUG_ERROR, "Error opening the file\n");
return RETURN_ERR;