direct-io.hg

changeset 10966:46df563bf1b8

[LIBXC] Do not gzclose() after close() on a gzdopen()'ed fd.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Aug 08 09:57:24 2006 +0100 (2006-08-08)
parents 922f8ae451f6
children 82230c3273e3
files tools/libxc/xc_linux_build.c
line diff
     1.1 --- a/tools/libxc/xc_linux_build.c	Tue Aug 08 09:51:08 2006 +0100
     1.2 +++ b/tools/libxc/xc_linux_build.c	Tue Aug 08 09:57:24 2006 +0100
     1.3 @@ -1373,10 +1373,10 @@ int xc_linux_build(int xc_handle,
     1.4  
     1.5   error_out:
     1.6      free(image);
     1.7 -    if ( fd >= 0 )
     1.8 +    if ( initrd_info.type == INITRD_file && initrd_info.u.file_handle )
     1.9 +        gzclose(initrd_info.u.file_handle);
    1.10 +    else if ( fd >= 0 )
    1.11          close(fd);
    1.12 -    if ( initrd_info.u.file_handle )
    1.13 -        gzclose(initrd_info.u.file_handle);
    1.14  
    1.15      return sts;
    1.16  }