Review Request 126508: kdesu: Fix fd leaks.

Aleix Pol Gonzalez aleixpol at kde.org
Fri Dec 25 01:35:33 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126508/#review90078
-----------------------------------------------------------

Ship it!


And more things than you'd think still use `kdesu`...

- Aleix Pol Gonzalez


On Dec. 25, 2015, 1:19 a.m., Michael Pyne wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126508/
> -----------------------------------------------------------
> 
> (Updated Dec. 25, 2015, 1:19 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kdesu
> 
> 
> Description
> -------
> 
> Don't leak fd when creating socket.
> 
> Coverity notes (CID 1289177) that we leak the fd for our socket in
> pretty much every error handling path.
> 
> Rather than laboriously add close(fd) calls everywhere I instead added a
> scope guard (and turned it off at the 'successful return' part).
> 
> 
> Diffs
> -----
> 
>   src/kdesud/kdesud.cpp f991727 
> 
> Diff: https://git.reviewboard.kde.org/r/126508/diff/
> 
> 
> Testing
> -------
> 
> Builds but I'm not sure what even still uses kdesu in 2015...
> 
> 
> Thanks,
> 
> Michael Pyne
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151225/f45f4ff4/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list