[docs] Update formatting in mono-api-security.
[mono.git] / mono / metadata / mono-route.c
index d651b0e5b08387b9b4829e0ce74b612e1fc3cc54..e6e397af0ec7cd4bca2b842d3d39b8a6cc3e003e 100644 (file)
@@ -1,6 +1,7 @@
-/*
- * mono-route.c: Read the network routing tables using sysctl(3) calls
- *               Required for Unix-like systems that don't have Linux's /proc/net/route
+/**
+ * \file
+ * Read the network routing tables using sysctl(3) calls
+ * Required for Unix-like systems that don't have Linux's /proc/net/route
  *
  * Author:
  *   Ben Woods (woodsb02@gmail.com)
@@ -53,7 +54,7 @@ extern MonoBoolean ves_icall_System_Net_NetworkInformation_MacOsIPInterfacePrope
                return FALSE;
 
        // Allocate suffcient memory for available data based on the previous sysctl call
-       if ((buf = malloc(needed)) == NULL)
+       if ((buf = g_malloc (needed)) == NULL)
                return FALSE;
 
        // Second sysctl call to retrieve data into appropriately sized buffer
@@ -102,7 +103,7 @@ extern MonoBoolean ves_icall_System_Net_NetworkInformation_MacOsIPInterfacePrope
                mono_array_setref (*gw_addr_list, gwnum, addr_string);
                gwnum++;
        }
-       free(buf);
+       g_free (buf);
        return TRUE;
 }