@@ -302,13 +302,14 @@ static char *GetFullFilename(const Conte
* @return true if the gunzip completed
*/
static bool GunzipFile(const ContentInfo *ci)
{
#if defined(WITH_ZLIB)
bool ret = true;
gzFile fin = gzopen(GetFullFilename(ci, true), "rb");
FILE *ftmp = fopen(GetFullFilename(ci, true), "rb");
gzFile fin = gzdopen(fileno(ftmp), "rb");
FILE *fout = fopen(GetFullFilename(ci, false), "wb");
if (fin == NULL || fout == NULL) {
ret = false;
goto exit;
}
@@ -320,13 +321,14 @@ static bool GunzipFile(const ContentInfo
break;
exit:
if (fin != NULL) gzclose(fin);
if (ftmp != NULL) fclose(ftmp);
if (fout != NULL) fclose(fout);
return ret;
#else
NOT_REACHED();
#endif /* defined(WITH_ZLIB) */
Status change: