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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to