[PATCH] s3/client/clitar.c: always close fd
Jeremy Allison
jra at samba.org
Wed Jun 1 23:46:23 UTC 2016
On Tue, May 31, 2016 at 04:00:04PM +0200, Andreas Schneider wrote:
> On Tuesday, 31 May 2016 15:54:09 CEST Aurélien Aptel wrote:
> > Hi,
> >
> > Small fix #2, problem also found by coverity.
> >
> > Please review&push, thanks!
>
> Hi Aurélien,
>
> thanks for your patch!
>
> We avoid several goto targets in a function. I the fd should be initialized
> with -1 and then in out: do:
>
> out:
> if (fd != -1) {
> close(fd);
> }
>
>
> Cheers,
>
>
> -- andreas
Like this you mean ? :-).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-client-clitar.c-always-close-fd.patch
Type: text/x-diff
Size: 989 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160601/d4e70887/0001-s3-client-clitar.c-always-close-fd.diff>
More information about the samba-technical
mailing list