Date: Tue, 28 Oct 2003 15:55:28 +0100 (CET) From: Lukas Ertl <l.ertl@univie.ac.at> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/58634: [PATCH] memory leak in geom_fox Message-ID: <200310281455.h9SEtSFI011115@leelou.in.tern> Resent-Message-ID: <200310281500.h9SF0ZkS099756@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 58634 >Category: kern >Synopsis: [PATCH] memory leak in geom_fox >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 28 07:00:34 PST 2003 >Closed-Date: >Last-Modified: >Originator: Lukas Ertl >Release: FreeBSD 5.1-CURRENT i386 >Organization: Vienna University Computer Center >Environment: System: FreeBSD leelou 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sat Oct 18 19:54:15 CEST 2003 le@leelou:/usr/obj/usr/src/sys/LEELOU i386 >Description: The g_fox_destroy_geom() routine deallocates and frees associated structures, but happens to manually set a pointer to NULL and then pass it to the g_free() routine. >How-To-Repeat: >Fix: --- geom_fox.c.diff begins here --- Index: sys/geom/geom_fox.c =================================================================== RCS file: /hugo/bsdcvs/src/sys/geom/geom_fox.c,v retrieving revision 1.3 diff -u -r1.3 geom_fox.c --- sys/geom/geom_fox.c 24 Oct 2003 18:46:23 -0000 1.3 +++ sys/geom/geom_fox.c 28 Oct 2003 14:42:56 -0000 @@ -452,9 +452,9 @@ g_topology_assert(); sc = gp->softc; - gp->softc = NULL; mtx_destroy(&sc->lock); g_free(gp->softc); + gp->softc = NULL; g_wither_geom(gp, ENXIO); return (0); } --- geom_fox.c.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310281455.h9SEtSFI011115>
