Merge the zlib fix properly; back out tridge's bandaid.
authorMartin Pool <mbp@samba.org>
Tue, 12 Mar 2002 00:33:51 +0000 (00:33 +0000)
committerMartin Pool <mbp@samba.org>
Tue, 12 Mar 2002 00:33:51 +0000 (00:33 +0000)
zlib/infblock.c
zlib/zutil.c
zlib/zutil.h

index 58f0628..55e0eec 100644 (file)
@@ -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)
index 2aafdab..7fb0327 100644 (file)
@@ -213,7 +213,7 @@ void  zcfree (opaque, ptr)
     voidpf opaque;
     voidpf ptr;
 {
-    if (ptr) free(ptr);
+    free(ptr);
     if (opaque) return; /* make compiler happy */
 }
 
index fbf2a98..f1d583e 100644 (file)
@@ -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 */