Skip to content

RDKB-6577 - #1317

Open
Kondamma12345 wants to merge 1 commit into
rdkcentral:developfrom
Kondamma12345:medium1
Open

RDKB-6577#1317
Kondamma12345 wants to merge 1 commit into
rdkcentral:developfrom
Kondamma12345:medium1

Conversation

@Kondamma12345

Copy link
Copy Markdown
Contributor

Reason for change: Fixing coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.

Risks: Low
Priority: P1
Signed-off-by: Kondamma_Kudumula@comcast.com

Reason for change: Fixing coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.

Risks: Low
Priority: P1
Signed-off-by: Kondamma_Kudumula@comcast.com
Copilot AI review requested due to automatic review settings August 3, 2026 10:35
@Kondamma12345
Kondamma12345 requested a review from a team as a code owner August 3, 2026 10:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses several static-analysis (Coverity) findings across the WiFi stack by tightening error handling and cleanup paths in mesh connection logic, DML/passpoint JSON parsing, OVSDB selection, and various controller/app handlers.

Changes:

  • Add missing allocation-failure handling and improve candidate list bookkeeping/cleanup for mesh STA scan results.
  • Fix multiple memory/resource leaks (cJSON objects, OVSDB record buffers, temporary strings) and adjust OVSDB select API to avoid returning freed pointers.
  • Minor logic correction for TR-181 radio index validation in the LEVL event handler.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
source/services/mesh/wifi_service_mesh.c Handle malloc failure for scan candidate list; compute scan_count from actual candidates; free list when no candidates found.
source/dml/tr_181/ml/cosa_wifi_dml.c Ensure parsed cJSON roots are deleted; free RFC string from PSM on success path.
source/db/wifi_db_apis.c Avoid using empty select results; free selected schema records on error paths and before returning.
source/core/wifi_passpoint.c Delete passPointCfg cJSON on HAL-update failure path; minor preprocessor whitespace cleanup.
source/core/wifi_ctrl_webconfig.c Free webconfig subdoc data consistently after encoding/pushing event.
source/core/wifi_ctrl_rbus_handlers.c Free harvester buffer on allocation failure to avoid leaks.
source/core/services/vap_svc_mesh_ext.c Add malloc failure handling; track scan_count as actual appended candidates.
source/apps/levl/wifi_levl.c Tighten radio index validation to match 1-based TR-181 instance numbering.
lib/ovsdb/ovsdb_table.c Return NULL on failure instead of returning a potentially freed records pointer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1868 to 1870
if ((radio < 1) || (radio > MAX_NUM_RADIOS)) {
wifi_util_dbg_print(WIFI_APPS, "%s:%d Invalid Radio: %u\n", __func__, __LINE__, radio-1);
pthread_mutex_unlock(&wifi_app->data.u.levl.lock);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants