diff options
author | phk <phk@FreeBSD.org> | 2003-05-02 08:33:26 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-02 08:33:26 +0000 |
commit | 94c69d48c903c084c8506603e008e78094617fd0 (patch) | |
tree | cc66885a8653a1951a8b22a53a785122ce373590 /sys/geom | |
parent | 7636503a41b9f00b2419bce0e31ae5c7c1dd8802 (diff) | |
download | FreeBSD-src-94c69d48c903c084c8506603e008e78094617fd0.zip FreeBSD-src-94c69d48c903c084c8506603e008e78094617fd0.tar.gz |
Use g_slice_spoiled() instead of g_std_spoiled().
Add XXX comment about minor memory leak until I can fix it.
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_gpt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c index 0783ecb..933b57e 100644 --- a/sys/geom/geom_gpt.c +++ b/sys/geom/geom_gpt.c @@ -188,6 +188,7 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) ent = (void*)(buf + i * hdr->hdr_entsz); if (!memcmp(&ent->ent_type, &unused, sizeof(unused))) continue; + /* XXX: This memory leaks */ gs->part[i] = g_malloc(hdr->hdr_entsz, M_WAITOK); if (gs->part[i] == NULL) break; @@ -214,7 +215,7 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) g_topology_lock(); g_access_rel(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { - g_std_spoiled(cp); + g_slice_spoiled(cp); return (NULL); } return (gp); |