diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-03-11 18:54:51 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-03-11 18:54:51 +0000 |
commit | 681930474072737451ca95ab5682c7ad69e95060 (patch) | |
tree | 60e153597de2fe02a4276da28a58d6a6e44d6d5d /zlib | |
parent | a795ab99c73ecf5cd577a8fc092074a850314664 (diff) | |
download | rsync-681930474072737451ca95ab5682c7ad69e95060.tar.gz rsync-681930474072737451ca95ab5682c7ad69e95060.tar.bz2 rsync-681930474072737451ca95ab5682c7ad69e95060.zip |
a quick fix for a segmentation fault in zlib I am getting whenever I
try to upload a file from rsync 2.5.2 to rsync 2.5.3
Diffstat (limited to 'zlib')
-rw-r--r-- | zlib/zutil.c | 2 | ||||
-rw-r--r-- | zlib/zutil.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/zlib/zutil.c b/zlib/zutil.c index 7fb0327b..2aafdab3 100644 --- a/zlib/zutil.c +++ b/zlib/zutil.c @@ -213,7 +213,7 @@ void zcfree (opaque, ptr) voidpf opaque; voidpf ptr; { - free(ptr); + if (ptr) free(ptr); if (opaque) return; /* make compiler happy */ } diff --git a/zlib/zutil.h b/zlib/zutil.h index f1d583e4..fbf2a980 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)) +#define ZFREE(strm, addr) ((*((strm)->zfree))((strm)->opaque, (voidpf)(addr)),(addr)=NULL) #define TRY_FREE(s, p) {if (p) ZFREE(s, p);} #endif /* _Z_UTIL_H */ |