Author: gonzo
Date: Sat May 14 18:44:30 2016
New Revision: 299747
URL: https://svnweb.freebsd.org/changeset/base/299747

Log:
  Use OF_prop_free instead of direct call to free(9)

Modified:
  head/sys/dev/altera/avgen/altera_avgen_fdt.c
  head/sys/dev/usb/controller/ehci_fsl.c

Modified: head/sys/dev/altera/avgen/altera_avgen_fdt.c
==============================================================================
--- head/sys/dev/altera/avgen/altera_avgen_fdt.c        Sat May 14 18:22:52 
2016        (r299746)
+++ head/sys/dev/altera/avgen/altera_avgen_fdt.c        Sat May 14 18:44:30 
2016        (r299747)
@@ -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);
 }
 

Modified: head/sys/dev/usb/controller/ehci_fsl.c
==============================================================================
--- head/sys/dev/usb/controller/ehci_fsl.c      Sat May 14 18:22:52 2016        
(r299746)
+++ head/sys/dev/usb/controller/ehci_fsl.c      Sat May 14 18:44:30 2016        
(r299747)
@@ -176,7 +176,7 @@ enable_usb(device_t dev, bus_space_tag_t
            (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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to