-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem/Opportunity
Some areas where allocated memory does not get cleared.
Eg:
- https://github.com/rdkcentral/networkmanager/blob/develop/plugin/gnome/NetworkManagerGnomeWIFI.cpp#L1040
- https://github.com/rdkcentral/networkmanager/blob/develop/plugin/gnome/NetworkManagerGnomeWIFI.cpp#L1202
- https://github.com/rdkcentral/networkmanager/blob/develop/plugin/gnome/NetworkManagerGnomeWIFI.cpp#L1237
- Previous unref is missing before exiting.
return ifname; - Missing wProxy and result unref before return.
if(iter == NULL)
Some areas where memory is cleared without any protection causing crashes.
Eg:
- https://github.com/rdkcentral/networkmanager/blob/develop/plugin/gnome/NetworkManagerGnomeProxy.cpp#L84
- https://github.com/rdkcentral/networkmanager/blob/develop/plugin/gnome/NetworkManagerGnomeWIFI.cpp#L56
- https://github.com/rdkcentral/networkmanager/blob/develop/plugin/gnome/NetworkManagerGnomeWIFI.cpp#L570
Suggestions:
- Analyze the codebase using heap check/memory leak detection tools (e.g., Valgrind, AddressSanitizer) to identify and resolve vulnerabilities.
- Add strict compile flags (such as -fsanitize=address, -Wall, -Wextra, -Werror) to enforce better memory management and catch issues during build time.
Consider making these checks mandatory in future development cycles.
Steps to reproduce
No response
Expected Behavior
NetworkManager shall not cause memory leak in any case.
Notes (Optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working