svn commit: r247910 - head/sys/dev/sound/pci/hda

Gleb Smirnoff glebius at FreeBSD.org
Thu Mar 7 07:54:50 UTC 2013


Author: glebius
Date: Thu Mar  7 07:54:50 2013
New Revision: 247910
URL: http://svnweb.freebsd.org/changeset/base/247910

Log:
  Plug a memory leak.
  
  Reviewed by:	mav
  Sponsored by:	Nginx, Inc.

Modified:
  head/sys/dev/sound/pci/hda/hdacc.c

Modified: head/sys/dev/sound/pci/hda/hdacc.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdacc.c	Thu Mar  7 07:28:05 2013	(r247909)
+++ head/sys/dev/sound/pci/hda/hdacc.c	Thu Mar  7 07:54:50 2013	(r247910)
@@ -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


More information about the svn-src-all mailing list