diff options
author | marks <none@none> | 2008-01-24 14:02:00 -0800 |
---|---|---|
committer | marks <none@none> | 2008-01-24 14:02:00 -0800 |
commit | 575bd8a230f2c20b1878ebb473c30a12f0eb1b2e (patch) | |
tree | 5ae2b288d66bd9a77e926d52369068691a2553c1 /usr/src/lib/libcmdutils/common/sysattrs.c | |
parent | 2f79bea12c9814c8829dad82312f3c944423bcce (diff) | |
download | illumos-gate-575bd8a230f2c20b1878ebb473c30a12f0eb1b2e.tar.gz |
6653731 getattrat() needs a little cleanup
Diffstat (limited to 'usr/src/lib/libcmdutils/common/sysattrs.c')
-rw-r--r-- | usr/src/lib/libcmdutils/common/sysattrs.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr/src/lib/libcmdutils/common/sysattrs.c b/usr/src/lib/libcmdutils/common/sysattrs.c index a22e8e5e21..5868e765cc 100644 --- a/usr/src/lib/libcmdutils/common/sysattrs.c +++ b/usr/src/lib/libcmdutils/common/sysattrs.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -48,18 +48,15 @@ int sysattr_status(char *file, xattr_view_t view) { - nvlist_t *response; + nvlist_t *response = NULL; int saveerrno; int status; - if (nvlist_alloc(&response, NV_UNIQUE_NAME, 0) != 0) { - return (0); - } - status = getattrat(AT_FDCWD, view, file, &response); saveerrno = errno; - (void) nvlist_free(response); + if (response) + (void) nvlist_free(response); errno = saveerrno; return (status == 0); |