From owner-freebsd-multimedia@FreeBSD.ORG Fri Jun 16 14:14:48 2006 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D577B16A474 for ; Fri, 16 Jun 2006 14:14:48 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from mail49.e.nsc.no (mail49.e.nsc.no [193.213.115.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E18A43D45 for ; Fri, 16 Jun 2006 14:14:47 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from Unknown-00-c0-9f-49-78-d8.lan (ti131310a080-6417.bb.online.no [85.165.217.17]) by mail49.nsc.no (8.13.6/8.13.5) with ESMTP id k5GEEjf1020111 for ; Fri, 16 Jun 2006 16:14:45 +0200 (CEST) From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Fri, 16 Jun 2006 16:14:49 +0200 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606161614.50505.hselasky@c2i.net> Subject: Small memory leak in sound system X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2006 14:14:48 -0000 Hi, I think I have found a memory leak, but I am not completely sure. Several drivers allocate the following structure, "struct sndcard_func", but never free it. Also "uaudio". Is this correct, or have I missed something? /* PCM Audio */ func = malloc(sizeof(struct sndcard_func), M_DEVBUF, M_NOWAIT); if (func == NULL) return (ENOMEM); bzero(func, sizeof(*func)); func->func = SCF_PCM; child = device_add_child(dev, "pcm", -1); device_set_ivars(child, func); bus_generic_attach(dev); Thanks, --HPS