[Bug 295310] sysutils/plasma6-ksystemstats memory leak

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 26 00:59:46 BST 2026


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295310

Jesper Schmitz Mouridsen <jsm at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm at FreeBSD.org

--- Comment #4 from Jesper Schmitz Mouridsen <jsm at FreeBSD.org> ---
I think I found a leak in my network code, where freeifaddrs is only called
with a nullptr as arg, when the for loops ends. It should be the head ifap
which should be freed outside of the loop IIUC. If the ones with the heavy mem
leak can confirm that the net code is the issue it only takes a rebuild without
the files/patch-network..

or test by modifying SysctlBackend.cpp in update around line 79 to something
like

ifaddrs *ifap0;
ifaddrs *ifap;

bzero(....) // both ifap0 and ifap

getifaddres(&ifap0);

for(ifap=ifap0;ifap!=nullptr;ifap = ifap->ifa_next) {around line 85 
...


}
and change freeifaddrs(ifap) to freeifaddrs(ifap0) after the for loop.


Thanks

/Jsm

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list