D13013: Small fixes for execute_kwallet

Albert Astals Cid noreply at phabricator.kde.org
Mon May 21 22:15:08 UTC 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180521/005c4254/attachment-0001.html>


More information about the Plasma-devel mailing list