[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [LIBXC] Do not gzclose() after close() on a gzdopen()'ed fd.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 46df563bf1b8f8fafefc48e96e715efbe60e95d7
# Parent  922f8ae451f6f613de7d5a4ede78ead993758403
[LIBXC] Do not gzclose() after close() on a gzdopen()'ed fd.
Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
---
 tools/libxc/xc_linux_build.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 922f8ae451f6 -r 46df563bf1b8 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Tue Aug 08 09:51:08 2006 +0100
+++ b/tools/libxc/xc_linux_build.c      Tue Aug 08 09:57:24 2006 +0100
@@ -1373,10 +1373,10 @@ int xc_linux_build(int xc_handle,
 
  error_out:
     free(image);
-    if ( fd >= 0 )
+    if ( initrd_info.type == INITRD_file && initrd_info.u.file_handle )
+        gzclose(initrd_info.u.file_handle);
+    else if ( fd >= 0 )
         close(fd);
-    if ( initrd_info.u.file_handle )
-        gzclose(initrd_info.u.file_handle);
 
     return sts;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.