svn commit: r241066 - in head/sys: dev/ie dev/sound/pci i386/bios x86/bios

Kevin Lo kevlo at FreeBSD.org
Sun Sep 30 09:21:11 UTC 2012


Author: kevlo
Date: Sun Sep 30 09:21:10 2012
New Revision: 241066
URL: http://svn.freebsd.org/changeset/base/241066

Log:
  Free result of device_get_children(9).

Modified:
  head/sys/dev/ie/if_ie_isa.c
  head/sys/dev/sound/pci/hdspe-pcm.c
  head/sys/dev/sound/pci/hdspe.c
  head/sys/i386/bios/smapi.c
  head/sys/x86/bios/smbios.c

Modified: head/sys/dev/ie/if_ie_isa.c
==============================================================================
--- head/sys/dev/ie/if_ie_isa.c	Sun Sep 30 07:52:40 2012	(r241065)
+++ head/sys/dev/ie/if_ie_isa.c	Sun Sep 30 09:21:10 2012	(r241066)
@@ -875,6 +875,7 @@ ie_modevent (mod, what, arg)
 		devclass_get_devices(ie_devclass, &devs, &count);
 		for (i = 0; i < count; i++)
 			device_delete_child(device_get_parent(devs[i]), devs[i]);
+		free(devs, M_TEMP);
 		break;
 	default:
 		break;

Modified: head/sys/dev/sound/pci/hdspe-pcm.c
==============================================================================
--- head/sys/dev/sound/pci/hdspe-pcm.c	Sun Sep 30 07:52:40 2012	(r241065)
+++ head/sys/dev/sound/pci/hdspe-pcm.c	Sun Sep 30 09:21:10 2012	(r241066)
@@ -207,6 +207,7 @@ hdspe_running(struct sc_info *sc)
 		}
 	}
 
+	free(devlist, M_TEMP);
 	return 0;
 bad:
 
@@ -214,6 +215,7 @@ bad:
 	device_printf(sc->dev,"hdspe is running\n");
 #endif
 
+	free(devlist, M_TEMP);
 	return 1;
 }
 

Modified: head/sys/dev/sound/pci/hdspe.c
==============================================================================
--- head/sys/dev/sound/pci/hdspe.c	Sun Sep 30 07:52:40 2012	(r241065)
+++ head/sys/dev/sound/pci/hdspe.c	Sun Sep 30 09:21:10 2012	(r241066)
@@ -107,6 +107,7 @@ hdspe_intr(void *p)
 		}
 
 		hdspe_write_1(sc, HDSPE_INTERRUPT_ACK, 0);
+		free(devlist, M_TEMP);
 	}
 
 	snd_mtxunlock(sc->lock);

Modified: head/sys/i386/bios/smapi.c
==============================================================================
--- head/sys/i386/bios/smapi.c	Sun Sep 30 07:52:40 2012	(r241065)
+++ head/sys/i386/bios/smapi.c	Sun Sep 30 09:21:10 2012	(r241066)
@@ -292,6 +292,7 @@ smapi_modevent (module_t mod, int what, 
 		for (i = 0; i < count; i++) {
 			device_delete_child(device_get_parent(devs[i]), devs[i]);
 		}
+		free(devs, M_TEMP);
 		break;
 	default:
 		break;

Modified: head/sys/x86/bios/smbios.c
==============================================================================
--- head/sys/x86/bios/smbios.c	Sun Sep 30 07:52:40 2012	(r241065)
+++ head/sys/x86/bios/smbios.c	Sun Sep 30 09:21:10 2012	(r241066)
@@ -204,6 +204,7 @@ smbios_modevent (mod, what, arg)
 		for (i = 0; i < count; i++) {
 			device_delete_child(device_get_parent(devs[i]), devs[i]);
 		}
+		free(devs, M_TEMP);
 		break;
 	default:
 		break;


More information about the svn-src-all mailing list