Free result of device_get_children(9).

This commit is contained in:
Kevin Lo 2012-09-30 09:21:10 +00:00
parent 089afddef4
commit b5db12bfb5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241066
5 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -207,6 +207,7 @@ hdspe_running(struct sc_info *sc)
}
}
free(devlist, M_TEMP);
return 0;
bad:
@ -214,6 +215,7 @@ hdspe_running(struct sc_info *sc)
device_printf(sc->dev,"hdspe is running\n");
#endif
free(devlist, M_TEMP);
return 1;
}

View File

@ -107,6 +107,7 @@ hdspe_intr(void *p)
}
hdspe_write_1(sc, HDSPE_INTERRUPT_ACK, 0);
free(devlist, M_TEMP);
}
snd_mtxunlock(sc->lock);

View File

@ -292,6 +292,7 @@ smapi_modevent (module_t mod, int what, void *arg)
for (i = 0; i < count; i++) {
device_delete_child(device_get_parent(devs[i]), devs[i]);
}
free(devs, M_TEMP);
break;
default:
break;

View File

@ -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;