From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 28 07:00:37 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D0DC16A4CE for ; Tue, 28 Oct 2003 07:00:37 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 949C843FBF for ; Tue, 28 Oct 2003 07:00:35 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9SF0ZFY099757 for ; Tue, 28 Oct 2003 07:00:35 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9SF0ZkS099756; Tue, 28 Oct 2003 07:00:35 -0800 (PST) (envelope-from gnats) Resent-Date: Tue, 28 Oct 2003 07:00:35 -0800 (PST) Resent-Message-Id: <200310281500.h9SF0ZkS099756@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lukas Ertl Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 673B916A4CE for ; Tue, 28 Oct 2003 06:55:44 -0800 (PST) Received: from mailbox.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31F7B43FDD for ; Tue, 28 Oct 2003 06:55:43 -0800 (PST) (envelope-from l.ertl@univie.ac.at) Received: from leelou.in.tern (adslle.cc.univie.ac.at [131.130.102.11]) h9SEtSXs319610 for ; Tue, 28 Oct 2003 15:55:34 +0100 Received: (from le@localhost) by leelou.in.tern (8.12.10/8.12.10/Submit) id h9SEtSFI011115; Tue, 28 Oct 2003 15:55:28 +0100 (CET) (envelope-from le) Message-Id: <200310281455.h9SEtSFI011115@leelou.in.tern> Date: Tue, 28 Oct 2003 15:55:28 +0100 (CET) From: Lukas Ertl To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/58634: [PATCH] memory leak in geom_fox X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Lukas Ertl List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2003 15:00:37 -0000 >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: