mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[LIBXC] Do not gzclose() after close() on a gzdopen()'ed fd.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
This commit is contained in:
1 parent
74d7945b4d
commit
dfcd4f6e10
1 file changed
+3
-3
@@ -1373,10 +1373,10 @@ int xc_linux_build(int xc_handle,
|
||||
|
||||
error_out:
|
||||
free(image);
|
||||
if ( fd >= 0 )
|
||||
close(fd);
|
||||
if ( initrd_info.u.file_handle )
|
||||
if ( initrd_info.type == INITRD_file && initrd_info.u.file_handle )
|
||||
gzclose(initrd_info.u.file_handle);
|
||||
else if ( fd >= 0 )
|
||||
close(fd);
|
||||
|
||||
return sts;
|
||||
}
|
||||
|
||||