[patch] fix fd leak when checking mtab

David Zeuthen david at fubar.dk
Tue May 25 10:04:46 PDT 2004


On Fri, 2004-05-21 at 11:02 +0200, Sjoerd Simons wrote:
> Hi,
> 

Hi,

Sorry for the delay - I was out traveling until yesterday.

>   hal doesn't close the filedescriptor when it /etc/mtab wasn't changed of the
>   fstat failed.
> 
>   Also when closing a file stream opened with fdopen, the original fd is also
>   closed (the fdopen function doesn't dup the fd). So the close after fclose 
>   is wrong. 
> 
>   Attached patch fixes these things.
> 

Nice catch, committed, thanks.

Cheers,
David


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list