if (error_msg)
*error_msg = NULL;
- module = (MonoDl *) malloc (sizeof (MonoDl));
+ module = (MonoDl *) g_malloc (sizeof (MonoDl));
if (!module) {
if (error_msg)
*error_msg = g_strdup ("Out of memory");
const char *ext;
/* This platform does not support dlopen */
if (name == NULL) {
- free (module);
+ g_free (module);
return NULL;
}
if (error_msg) {
*error_msg = mono_dl_current_error_string ();
}
- free (module);
+ g_free (module);
return NULL;
}
}
} else {
#if MONO_DL_NEED_USCORE
{
- char *usname = malloc (strlen (name) + 2);
+ char *usname = g_malloc (strlen (name) + 2);
*usname = '_';
strcpy (usname + 1, name);
sym = mono_dl_lookup_symbol (module, usname);
- free (usname);
+ g_free (usname);
}
#else
sym = mono_dl_lookup_symbol (module, name);
} else
mono_dl_close_handle (module);
- free (module);
+ g_free (module);
}
/**