diff options
Diffstat (limited to 'infback.c')
-rw-r--r-- | infback.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -42,10 +42,19 @@ int stream_size; | |||
42 | return Z_STREAM_ERROR; | 42 | return Z_STREAM_ERROR; |
43 | strm->msg = Z_NULL; /* in case we return an error */ | 43 | strm->msg = Z_NULL; /* in case we return an error */ |
44 | if (strm->zalloc == (alloc_func)0) { | 44 | if (strm->zalloc == (alloc_func)0) { |
45 | #ifdef Z_SOLO | ||
46 | return Z_STREAM_ERROR; | ||
47 | #else | ||
45 | strm->zalloc = zcalloc; | 48 | strm->zalloc = zcalloc; |
46 | strm->opaque = (voidpf)0; | 49 | strm->opaque = (voidpf)0; |
50 | #endif | ||
47 | } | 51 | } |
48 | if (strm->zfree == (free_func)0) strm->zfree = zcfree; | 52 | if (strm->zfree == (free_func)0) |
53 | #ifdef Z_SOLO | ||
54 | return Z_STREAM_ERROR; | ||
55 | #else | ||
56 | strm->zfree = zcfree; | ||
57 | #endif | ||
49 | state = (struct inflate_state FAR *)ZALLOC(strm, 1, | 58 | state = (struct inflate_state FAR *)ZALLOC(strm, 1, |
50 | sizeof(struct inflate_state)); | 59 | sizeof(struct inflate_state)); |
51 | if (state == Z_NULL) return Z_MEM_ERROR; | 60 | if (state == Z_NULL) return Z_MEM_ERROR; |