check if the mem is allocated
authordoursse <doursse>
Sat, 27 Jan 2007 04:05:58 +0000 (04:05 +0000)
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 27 Jan 2007 04:05:58 +0000 (04:05 +0000)
SVN revision: 28127

legacy/ecore/src/lib/ecore/ecore_plugin.c

index ab26591..d077319 100644 (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;