Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-19 Thread Ian Jackson
Konrad Rzeszutek Wilk writes ("Re: [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths."): > > > If I turned them in: > > if (..blah..) > { > close(infd); > return -1; > } > > would that satisfy you? I would strongly resist

Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-19 Thread Jan Beulich
>>> On 18.02.16 at 22:12, wrote: > On Thu, Feb 18, 2016 at 09:45:30AM -0700, Jan Beulich wrote: >> >>> On 18.02.16 at 17:39, wrote: >> > Jan Beulich writes ("Re: [PATCH v3 5/5] mkelf32: Close those file > descriptors >> > in the error

Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-18 Thread Konrad Rzeszutek Wilk
On Thu, Feb 18, 2016 at 09:45:30AM -0700, Jan Beulich wrote: > >>> On 18.02.16 at 17:39, wrote: > > Jan Beulich writes ("Re: [PATCH v3 5/5] mkelf32: Close those file > > descriptors > > in the error paths."): > >> On 12.02.16 at 04:08, wrote:

Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-18 Thread Jan Beulich
>>> On 18.02.16 at 17:39, wrote: > Jan Beulich writes ("Re: [PATCH v3 5/5] mkelf32: Close those file descriptors > in the error paths."): >> On 12.02.16 at 04:08, wrote: >> > While we are operating here we may as well fix some of the >> > file

Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-18 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths."): > On 12.02.16 at 04:08, wrote: > > While we are operating here we may as well fix some of the > > file descriptor leaks. > > I'm not convinced. The added goto-s make the

Re: [Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-18 Thread Jan Beulich
>>> On 12.02.16 at 04:08, wrote: > While we are operating here we may as well fix some of the > file descriptor leaks. I'm not convinced. The added goto-s make the code uglier to read, and this being a standalone utility there's not really any leak here. Jan

[Xen-devel] [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.

2016-02-11 Thread Konrad Rzeszutek Wilk
While we are operating here we may as well fix some of the file descriptor leaks. Signed-off-by: Konrad Rzeszutek Wilk --- xen/arch/x86/boot/mkelf32.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git