Print this page
patch tsoome-feedback

*** 198,218 **** NV_UNIQUE_NAME|NV_UNIQUE_NAME_TYPE, 0); } if (cmd_breakup_components(nac, "/", hc_list) < 0) { for (i = 0; i < n; i++) { - if (hc_list[i] != NULL) nvlist_free(hc_list[i]); } fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n); fmd_hdl_free(hdl, nac, len); return (NULL); } if (nvlist_alloc(&fru, NV_UNIQUE_NAME, 0) != 0) { for (i = 0; i < n; i++) { - if (hc_list[i] != NULL) nvlist_free(hc_list[i]); } fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n); fmd_hdl_free(hdl, nac, len); return (NULL); --- 198,216 ----
*** 222,242 **** nvlist_add_string(fru, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0 || nvlist_add_string(fru, FM_FMRI_HC_ROOT, "") != 0 || nvlist_add_uint32(fru, FM_FMRI_HC_LIST_SZ, n) != 0 || nvlist_add_nvlist_array(fru, FM_FMRI_HC_LIST, hc_list, n) != 0) { for (i = 0; i < n; i++) { - if (hc_list[i] != NULL) nvlist_free(hc_list[i]); } fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n); fmd_hdl_free(hdl, nac, len); nvlist_free(fru); return (NULL); } for (i = 0; i < n; i++) { - if (hc_list[i] != NULL) nvlist_free(hc_list[i]); } fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n); fmd_hdl_free(hdl, nac, len); --- 220,238 ----
*** 270,280 **** if (nvlfru == NULL) return (NULL); flt = cmd_nvl_create_fault(hdl, fltnm, cert, nvlfru, nvlfru, NULL); flt = cmd_fault_add_location(hdl, flt, loc); - if (nvlfru != NULL) nvlist_free(nvlfru); return (flt); } /* find_mb -- find hardware platform motherboard within libtopo */ --- 266,275 ----
*** 636,653 **** FM_FMRI_HC_SPECIFIC, hsp); } } fllist = fmd_nvl_create_fault(hdl, class, cert, asru, fru, rsrc); - if (hsp != NULL) nvlist_free(hsp); } else { rsrc = get_cpu_fault_resource(hdl, asru); fllist = fmd_nvl_create_fault(hdl, class, cert, asru, fru, rsrc); } - if (rsrc != NULL) nvlist_free(rsrc); return (fllist); } --- 631,646 ----