aboutsummaryrefslogtreecommitdiff
path: root/src/zlib-ng/test/example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zlib-ng/test/example.c')
-rw-r--r--src/zlib-ng/test/example.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zlib-ng/test/example.c b/src/zlib-ng/test/example.c
index 4010c91..97ca002 100644
--- a/src/zlib-ng/test/example.c
+++ b/src/zlib-ng/test/example.c
@@ -909,6 +909,11 @@ void test_deflate_set_header(unsigned char *compr, size_t comprLen) {
size_t len = strlen(hello)+1;
+ if (head == NULL) {
+ printf("out of memory\n");
+ exit(1);
+ }
+
c_stream.zalloc = zalloc;
c_stream.zfree = zfree;
c_stream.opaque = (voidpf)0;