summaryrefslogtreecommitdiffstats
path: root/src/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gzip.c')
-rw-r--r--src/gzip.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gzip.c b/src/gzip.c
index 2596739..dc22ee0 100644
--- a/src/gzip.c
+++ b/src/gzip.c
@@ -71,7 +71,6 @@ opkg_opk_gzip_read(struct opkg_opk_gzip *gzip, void *record)
break;
case OPKG_OPK_ERROR:
default:
- inflateEnd(&gzip->stream);
return OPKG_OPK_ERROR;
}
}
@@ -84,11 +83,16 @@ opkg_opk_gzip_read(struct opkg_opk_gzip *gzip, void *record)
case Z_BUF_ERROR:
break;
case Z_STREAM_END:
- inflateEnd(&gzip->stream);
return OPKG_OPK_END;
default:
- inflateEnd(&gzip->stream);
return OPKG_OPK_ERROR;
}
}
}
+
+void
+opkg_opk_gzip_free(struct opkg_opk_gzip *gzip)
+{
+ inflateEnd(&gzip->stream);
+ free(gzip);
+}