check if the mem is allocated

SVN revision: 28127
This commit is contained in:
doursse 2007-01-27 04:05:58 +00:00 committed by doursse
parent f83fd02952
commit 49ff134118
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ ecore_plugin_load(int group_id, char *plugin_name)
* Allocate the new plugin and initialize it's fields
*/
plugin = malloc(sizeof(Ecore_Plugin));
if (!plugin)
{
dlclose(handle);
return NULL;
}
memset(plugin, 0, sizeof(Ecore_Plugin));
plugin->group = group_id;