aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2013-03-07 07:54:50 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2013-03-07 07:54:50 +0000
commita95940fd46ace5cf22f22d3802516f2b9d8ef148 (patch)
tree8909b9dae871bc2344d12356acb58418c04dd3f2
parent1e0e83d760a799bf7662acdee12fa254682a778b (diff)
downloadsrc-a95940fd46ace5cf22f22d3802516f2b9d8ef148.tar.gz
src-a95940fd46ace5cf22f22d3802516f2b9d8ef148.zip
Plug a memory leak.
Reviewed by: mav Sponsored by: Nginx, Inc.
Notes
Notes: svn path=/head/; revision=247910
-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 55bf4af8b843..c9282c917b89 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