changeset 3081:358d7ea0f473

6482512 cpumem-diagnosis causes fmd to dump core in response to "ereport.cpu.*.fpu.hwcopy" e-report
author td122701
date Thu, 09 Nov 2006 12:11:32 -0800
parents deef42200cee
children 6bb20c63d0cc
files usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c	Thu Nov 09 11:33:08 2006 -0800
+++ b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c	Thu Nov 09 12:11:32 2006 -0800
@@ -81,12 +81,14 @@
 
 		fmd_case_add_serd(hdl, cc->cc_cp, cc->cc_serdnm);
 	} else {
-		fmd_hdl_debug(hdl,
-		    "destroying existing %s state for class %x\n",
-		    cc->cc_serdnm, clcode);
-		fmd_serd_destroy(hdl, cc->cc_serdnm);
-		fmd_hdl_strfree(hdl, cc->cc_serdnm);
-		cc->cc_serdnm = NULL;
+		if (cc->cc_serdnm != NULL) {
+			fmd_hdl_debug(hdl,
+			    "destroying existing %s state for class %x\n",
+			    cc->cc_serdnm, clcode);
+			fmd_serd_destroy(hdl, cc->cc_serdnm);
+			fmd_hdl_strfree(hdl, cc->cc_serdnm);
+			cc->cc_serdnm = NULL;
+		}
 		fmd_case_reset(hdl, cc->cc_cp);
 		fmd_case_add_ereport(hdl, cc->cc_cp, ep);
 	}