summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-03-07 07:54:50 +0000
committerglebius <glebius@FreeBSD.org>2013-03-07 07:54:50 +0000
commita02ad4ada577b7f3f0afcd12476c8dc46b46bbeb (patch)
tree8909b9dae871bc2344d12356acb58418c04dd3f2 /sys/dev/sound
parent0d18b7b93ee1ed07a3c09dafb62c763c56e0ce17 (diff)
downloadFreeBSD-src-a02ad4ada577b7f3f0afcd12476c8dc46b46bbeb.zip
FreeBSD-src-a02ad4ada577b7f3f0afcd12476c8dc46b46bbeb.tar.gz
Plug a memory leak.
Reviewed by: mav Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/hda/hdacc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c
index 55bf4af..c9282c9 100644
--- a/sys/dev/sound/pci/hda/hdacc.c
+++ b/sys/dev/sound/pci/hda/hdacc.c
@@ -460,8 +460,12 @@ hdacc_attach(device_t dev)
static int
hdacc_detach(device_t dev)
{
+ struct hdacc_softc *codec = device_get_softc(dev);
+ int error;
- return (device_delete_children(dev));
+ error = device_delete_children(dev);
+ free(codec->fgs, M_HDACC);
+ return (error);
}
static int
OpenPOWER on IntegriCloud