changeset 10521:1eaab2a76b85

6881685 zoneadmd core dump if brand hook prints output
author <gerald.jelinek@sun.com>
date Mon, 14 Sep 2009 12:46:21 -0600
parents 1303da84e47a
children c355ff626865
files usr/src/cmd/zoneadmd/zoneadmd.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/zoneadmd/zoneadmd.c	Mon Sep 14 11:09:53 2009 -0700
+++ b/usr/src/cmd/zoneadmd/zoneadmd.c	Mon Sep 14 12:46:21 2009 -0600
@@ -730,8 +730,9 @@
 	}
 
 	while (fgets(inbuf, 1024, file) != NULL) {
-		if (retstr == NULL && zlogp != &logsys) {
-			zerror(zlogp, B_FALSE, "%s", inbuf);
+		if (retstr == NULL) {
+			if (zlogp != &logsys)
+				zerror(zlogp, B_FALSE, "%s", inbuf);
 		} else {
 			char *p;