summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/lib/zip_new.c')
-rw-r--r--ext/zip/lib/zip_new.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/zip/lib/zip_new.c b/ext/zip/lib/zip_new.c
index d54a247c29..562dd76a36 100644
--- a/ext/zip/lib/zip_new.c
+++ b/ext/zip/lib/zip_new.c
@@ -1,6 +1,6 @@
/*
zip_new.c -- create and init struct zip
- Copyright (C) 1999-2014 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2015 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -52,6 +52,11 @@ _zip_new(zip_error_t *error)
return NULL;
}
+ if ((za->names = _zip_hash_new(ZIP_HASH_TABLE_SIZE, error)) == NULL) {
+ free(za);
+ return NULL;
+ }
+
za->src = NULL;
za->open_flags = 0;
zip_error_init(&za->error);