diff options
author | gww <none@none> | 2008-01-11 13:47:06 -0800 |
---|---|---|
committer | gww <none@none> | 2008-01-11 13:47:06 -0800 |
commit | 997ec7102007efcf2514c6f8c2c3d50946239970 (patch) | |
tree | cff8b6d40f9a6a036bd725eae32dfe7dd542f375 /usr/src/lib/passwdutil/files_attr.c | |
parent | aa92d85b088543197e9fb4594eb30d5215fca2c1 (diff) | |
download | illumos-gate-997ec7102007efcf2514c6f8c2c3d50946239970.tar.gz |
6647350 passwdutil:files_attr appears to have memory use problems
Diffstat (limited to 'usr/src/lib/passwdutil/files_attr.c')
-rw-r--r-- | usr/src/lib/passwdutil/files_attr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/lib/passwdutil/files_attr.c b/usr/src/lib/passwdutil/files_attr.c index f0d9c95bc5..63da6ed4e8 100644 --- a/usr/src/lib/passwdutil/files_attr.c +++ b/usr/src/lib/passwdutil/files_attr.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. */ @@ -226,6 +226,8 @@ files_getpwnam(char *name, attrlist *items, pwu_repository_t *rep, void **buf) *buf = calloc(1, sizeof (struct pwbuf)); pwbuf = (struct pwbuf *)*buf; + if (pwbuf == NULL) + return (PWU_NOMEM); /* * determine which password structure (/etc/passwd or /etc/shadow) |