diff options
author | marks <none@none> | 2006-03-14 11:35:05 -0800 |
---|---|---|
committer | marks <none@none> | 2006-03-14 11:35:05 -0800 |
commit | f0a2d94fac0bda585fe02eb5f086dbbf15c986a7 (patch) | |
tree | b8a6b4705f5ed11961056a9e97335f1fdafadf55 /usr/src | |
parent | 9df12a23948bd40cbe37ce88d84e272c3894e675 (diff) | |
download | illumos-gate-f0a2d94fac0bda585fe02eb5f086dbbf15c986a7.tar.gz |
6395977 unpack dump core when run over NFSv4 over ZFS
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/compress/compress.c | 8 | ||||
-rw-r--r-- | usr/src/cmd/pack/pack.c | 11 | ||||
-rw-r--r-- | usr/src/cmd/unpack/unpack.c | 13 |
3 files changed, 18 insertions, 14 deletions
diff --git a/usr/src/cmd/compress/compress.c b/usr/src/cmd/compress/compress.c index dba163196b..03341add41 100644 --- a/usr/src/cmd/compress/compress.c +++ b/usr/src/cmd/compress/compress.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1603,7 +1603,7 @@ copystat(char *ifname, struct stat *ifstat, char *ofname) { mode_t mode; struct utimbuf timep; - acl_t *aclp; + acl_t *aclp = NULL; int error; if (fclose(outp)) { @@ -1667,8 +1667,10 @@ copystat(char *ifname, struct stat *ifstat, char *ofname) "entries\n"), ofname); perm_stat = 1; } - if (aclp) + if (aclp) { acl_free(aclp); + aclp = NULL; + } /* Copy ownership */ (void) chown(ofname, ifstat->st_uid, ifstat->st_gid); diff --git a/usr/src/cmd/pack/pack.c b/usr/src/cmd/pack/pack.c index 9084f2dcf7..181e6a61db 100644 --- a/usr/src/cmd/pack/pack.c +++ b/usr/src/cmd/pack/pack.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -536,8 +535,10 @@ main(int argc, char *argv[]) unlink(filename); } - if (aclp) + if (aclp) { acl_free(aclp); + aclp = NULL; + } closein: close(outfile); close(infile); diff --git a/usr/src/cmd/unpack/unpack.c b/usr/src/cmd/unpack/unpack.c index 766d129066..44f70ac51b 100644 --- a/usr/src/cmd/unpack/unpack.c +++ b/usr/src/cmd/unpack/unpack.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -24,7 +23,7 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -248,7 +247,7 @@ main(int argc, char *argv[]) int fcount = 0; /* failure count */ int max_name; void onsig(int); - acl_t *aclp; + acl_t *aclp = NULL; if (signal(SIGHUP, SIG_IGN) != SIG_IGN) @@ -434,8 +433,10 @@ done: (void) close(infile); if (!pcat) (void) close(outfile); - if (aclp) + if (aclp) { acl_free(aclp); + aclp = NULL; + } } return (fcount); } |