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.
-
Missing wProxy and result unref before return.
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
Problem/Opportunity
Some areas where allocated memory does not get cleared.
Eg:
networkmanager/plugin/gnome/gdbus/NetworkManagerGdbusEvent.cpp
Line 51 in 35690e0
networkmanager/plugin/gnome/gdbus/NetworkManagerGdbusEvent.cpp
Line 752 in 35690e0
Some areas where memory is cleared without any protection causing crashes.
Eg:
Suggestions:
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