Skip to content

Conversation

@myungjoo
Copy link
Member

Fix potential memory leak in _ml_info_set_value when g_strdup(key) fails due to out-of-memory.

The original design correctly handled memory deallocation during normal ml_service_destroy paths. However, if g_strdup(key) failed within _ml_info_set_value (e.g., due to OOM), the value and info_value allocated prior to the g_strdup call would not be freed, leading to a leak. This change ensures these resources are properly released in such an error scenario.


Open in Cursor Open in Web

Co-authored-by: myungjoo.ham <myungjoo.ham@samsung.com>
@cursor
Copy link

cursor bot commented Dec 12, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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.

3 participants