summaryrefslogtreecommitdiff
path: root/zlib
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-03-12 00:33:51 +0000
committerMartin Pool <mbp@samba.org>2002-03-12 00:33:51 +0000
commit0bc467516a83259a1a4b4059001caa6fe0383b46 (patch)
treedb446b5cbe863cc961395d373d876d41b7f18965 /zlib
parent844f11f284a1b146bab0a96a5af2f920b37cf053 (diff)
downloadrsync-0bc467516a83259a1a4b4059001caa6fe0383b46.tar.gz
Merge the zlib fix properly; back out tridge's bandaid.
Diffstat (limited to 'zlib')
-rw-r--r--zlib/infblock.c1
-rw-r--r--zlib/zutil.c2
-rw-r--r--zlib/zutil.h2
3 files changed, 2 insertions, 3 deletions
diff --git a/zlib/infblock.c b/zlib/infblock.c
index 58f0628c..55e0eec0 100644
--- a/zlib/infblock.c
+++ b/zlib/infblock.c
@@ -315,7 +315,6 @@ int r;
t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
s->sub.trees.blens, &bl, &bd, &tl, &td,
s->hufts, z);
- ZFREE(z, s->sub.trees.blens);
if (t != Z_OK)
{
if (t == (uInt)Z_DATA_ERROR)
diff --git a/zlib/zutil.c b/zlib/zutil.c
index 2aafdab3..7fb0327b 100644
--- a/zlib/zutil.c
+++ b/zlib/zutil.c
@@ -213,7 +213,7 @@ void zcfree (opaque, ptr)
voidpf opaque;
voidpf ptr;
{
- if (ptr) free(ptr);
+ free(ptr);
if (opaque) return; /* make compiler happy */
}
diff --git a/zlib/zutil.h b/zlib/zutil.h
index fbf2a980..f1d583e4 100644
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -217,7 +217,7 @@ void zcfree OF((voidpf opaque, voidpf ptr));
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr) ((*((strm)->zfree))((strm)->opaque, (voidpf)(addr)),(addr)=NULL)
+#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
#endif /* _Z_UTIL_H */