summaryrefslogtreecommitdiffstats
path: root/usr.bin/unzip/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/unzip/unzip.c')
-rw-r--r--usr.bin/unzip/unzip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c
index b80810c..87927d2 100644
--- a/usr.bin/unzip/unzip.c
+++ b/usr.bin/unzip/unzip.c
@@ -862,7 +862,9 @@ unzip(const char *fn)
if ((fd = open(fn, O_RDONLY)) < 0)
error("%s", fn);
- a = archive_read_new();
+ if ((a = archive_read_new()) == NULL)
+ error("archive_read_new failed");
+
ac(archive_read_support_format_zip(a));
ac(archive_read_open_fd(a, fd, 8192));
OpenPOWER on IntegriCloud