summaryrefslogtreecommitdiff
path: root/usr/src/lib/nsswitch/files/common
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/nsswitch/files/common')
-rw-r--r--usr/src/lib/nsswitch/files/common/getexecattr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/lib/nsswitch/files/common/getexecattr.c b/usr/src/lib/nsswitch/files/common/getexecattr.c
index d4993a98e1..c0b47ea419 100644
--- a/usr/src/lib/nsswitch/files/common/getexecattr.c
+++ b/usr/src/lib/nsswitch/files/common/getexecattr.c
@@ -19,8 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#include <stdlib.h>
@@ -133,9 +132,11 @@ _exec_files_XY_all(files_backend_ptr_t be,
f_size = f_stat.st_size;
f_time = f_stat.st_mtime;
- while (f_time > read_time) {
+ while (f_time > read_time || f_buf == NULL) {
/*
- * file has been modified since we last read it.
+ * file has been modified since we last read it
+ * or we never read it or memory allocation
+ * failed before.
* read it into the buffer with rw lock.
*/
(void) rw_unlock(&exec_lock);