-/*
- * 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)
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
mono_array_setref (*gw_addr_list, gwnum, addr_string);
gwnum++;
}
- free(buf);
+ g_free (buf);
return TRUE;
}