aacid added a comment.
In D13013#265868 <https://phabricator.kde.org/D13013#265868>, @fvogt wrote: > fullSocket was malloc'd by the parent process. free()-ing it is pointless. it's not pointless, it's "unneeded" since the child process will exit on the "cleanup" goto and then all its resources should be freed anyway by the OS, *but* it is the correct thing to do, the fact that the memory was allocated by the parent process doesn't mean the memory still needs freeing in the child process too, i.e. fork basically "mallocs" the memory again (simplified version of what is happening). Example: at https://paste.kde.org/psqeol0uc REPOSITORY R107 KWallet PAM Integration BRANCH master REVISION DETAIL https://phabricator.kde.org/D13013 To: aacid, fvogt Cc: anthonyfieroni, mgerstner, fvogt, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart