[Bug 295310] sysutils/plasma6-ksystemstats memory leak

[email protected] Mon, 25 May 2026 23:59:46 +0000
Newsgroups gmane.comp.kde.freebsd
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295310

Jesper Schmitz Mouridsen <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Jesper Schmitz Mouridsen <[email protected]> ---
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.