summaryrefslogtreecommitdiff
path: root/xdelta1/xdmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta1/xdmain.c')
-rwxr-xr-xxdelta1/xdmain.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xdelta1/xdmain.c b/xdelta1/xdmain.c
index b1abc74..9d767bb 100755
--- a/xdelta1/xdmain.c
+++ b/xdelta1/xdmain.c
@@ -639,7 +639,7 @@ file_gunzip (const char* name)
639 FILE* out = fopen (new_name, FOPEN_WRITE_ARG); 639 FILE* out = fopen (new_name, FOPEN_WRITE_ARG);
640 gzFile in = gzopen (name, "rb"); 640 gzFile in = gzopen (name, "rb");
641 guint8 buf[1024]; 641 guint8 buf[1024];
642 int nread; 642 int nread, ret;
643 643
644 while ((nread = gzread (in, buf, 1024)) > 0) 644 while ((nread = gzread (in, buf, 1024)) > 0)
645 { 645 {
@@ -656,7 +656,12 @@ file_gunzip (const char* name)
656 return NULL; 656 return NULL;
657 } 657 }
658 658
659 gzclose (in); 659 ret = gzclose (in);
660 if (ret != Z_OK)
661 {
662 xd_error ("gzip input decompression failed: %s\n", name);
663 return NULL;
664 }
660 665
661 if (fclose (out)) 666 if (fclose (out))
662 { 667 {