diff --git a/sys/dev/altera/avgen/altera_avgen_fdt.c b/sys/dev/altera/avgen/altera_avgen_fdt.c index 09fba3960edf..79e07eae1e53 100644 --- a/sys/dev/altera/avgen/altera_avgen_fdt.c +++ b/sys/dev/altera/avgen/altera_avgen_fdt.c @@ -120,11 +120,11 @@ altera_avgen_fdt_attach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res); if (str_fileio != NULL) - free(str_fileio, M_OFWPROP); + OF_prop_free(str_fileio); if (str_mmapio != NULL) - free(str_mmapio, M_OFWPROP); + OF_prop_free(str_mmapio); if (str_devname != NULL) - free(str_devname, M_OFWPROP); + OF_prop_free(str_devname); return (error); } diff --git a/sys/dev/usb/controller/ehci_fsl.c b/sys/dev/usb/controller/ehci_fsl.c index 7db642e780f8..a877d5ea5fd1 100644 --- a/sys/dev/usb/controller/ehci_fsl.c +++ b/sys/dev/usb/controller/ehci_fsl.c @@ -176,7 +176,7 @@ enable_usb(device_t dev, bus_space_tag_t iot, bus_space_handle_t ioh) (OF_getprop_alloc(node, "phy_type", 1, (void **)&phy_type) > 0)) { if (strncasecmp(phy_type, "utmi", strlen("utmi")) == 0) tmp |= UTMI_PHY_EN; - free(phy_type, M_OFWPROP); + OF_prop_free(phy_type); } bus_space_write_4(iot, ioh, CONTROL, tmp); }