summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authoraf <none@none>2007-11-30 08:37:21 -0800
committeraf <none@none>2007-11-30 08:37:21 -0800
commite46e4715a19570ec80958ef89a3f1232c476728a (patch)
treebd8b32282bab30b609792d518ae5451321c11b36 /usr
parent47a019781753b6025b1d6e7df3b4bf109cb272c3 (diff)
downloadillumos-gate-e46e4715a19570ec80958ef89a3f1232c476728a.tar.gz
6633535 intel_nb5000 small memory leak in initialization
Diffstat (limited to 'usr')
-rw-r--r--usr/src/uts/i86pc/io/intel_nb5000/intel_nbdrv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/i86pc/io/intel_nb5000/intel_nbdrv.c b/usr/src/uts/i86pc/io/intel_nb5000/intel_nbdrv.c
index 7b3daa2596..c098ee7ea8 100644
--- a/usr/src/uts/i86pc/io/intel_nb5000/intel_nbdrv.c
+++ b/usr/src/uts/i86pc/io/intel_nb5000/intel_nbdrv.c
@@ -150,6 +150,8 @@ inb_rank(nvlist_t *newdimm, nb_dimm_t *nb_dimm, uint8_t channel, uint32_t dimm)
}
(void) nvlist_add_nvlist_array(newdimm, MCINTEL_NVLIST_RANKS, newrank,
nb_dimm->nranks);
+ for (i = 0; i < nb_dimm->nranks; i++)
+ nvlist_free(newrank[i]);
kmem_free(newrank, sizeof (nvlist_t *) * nb_dimm->nranks);
}
@@ -248,6 +250,8 @@ inb_dimmlist(nvlist_t *nvl)
}
(void) nvlist_add_nvlist_array(nvl, MCINTEL_NVLIST_MC, newchannel,
nchannels);
+ for (i = 0; i < nchannels; i++)
+ nvlist_free(newchannel[i]);
kmem_free(dimmlist, sizeof (nvlist_t *) * nb_dimms_per_channel);
kmem_free(newchannel, sizeof (nvlist_t *) * nchannels);
}