summaryrefslogtreecommitdiff
path: root/acorn/acornzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'acorn/acornzip.c')
-rw-r--r--acorn/acornzip.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/acorn/acornzip.c b/acorn/acornzip.c
index 8de308c..40debc0 100644
--- a/acorn/acornzip.c
+++ b/acorn/acornzip.c
@@ -1,7 +1,7 @@
/*
- Copyright (c) 1990-2005 Info-ZIP. All rights reserved.
+ Copyright (c) 1990-2002 Info-ZIP. All rights reserved.
- See the accompanying file LICENSE, version 2004-May-22 or later
+ See the accompanying file LICENSE, version 2000-Apr-09 or later
(the contents of which are also included in zip.h) for terms of use.
If, for some reason, all these files are missing, the Info-ZIP license
also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
@@ -425,6 +425,7 @@ iztimes *t; /* return value: access, modific. and creation times */
a file size of -1 */
{
struct stat s; /* results of stat() */
+ /* convert FNMAX to malloc - 11/8/04 EG */
char *name;
unsigned int len = strlen(f);
@@ -437,7 +438,6 @@ iztimes *t; /* return value: access, modific. and creation times */
t->atime = t->mtime = t->ctime = label_utim;
return label_time;
}
-
if ((name = malloc(len + 1)) == NULL) {
ZIPERR(ZE_MEM, "filetime");
}
@@ -458,6 +458,7 @@ iztimes *t; /* return value: access, modific. and creation times */
free(name);
return 0;
}
+ free(name);
if (a != NULL) {
*a = ((ulg)s.st_mode << 16) | !(s.st_mode & S_IWRITE);
@@ -473,8 +474,6 @@ iztimes *t; /* return value: access, modific. and creation times */
t->ctime = s.st_ctime;
}
- free(name);
-
return unix2dostime((time_t *) &s.st_mtime);
}