fix some valgrind issues

SVN revision: 43657
This commit is contained in:
Carsten Haitzler 2009-11-13 08:28:47 +00:00
parent 7999691b9f
commit b5d5817a88
2 changed files with 11 additions and 7 deletions

View File

@ -238,6 +238,9 @@ evas_gl_common_context_free(Evas_GL_Context *gc)
gc->references--;
if (gc->references > 0) return;
gc->shared->references--;
evas_gl_common_image_free(gc->def_surface);
if (gc->shared->references == 0)
{
while (gc->shared->images)
@ -261,8 +264,7 @@ evas_gl_common_context_free(Evas_GL_Context *gc)
shared = NULL;
}
evas_gl_common_image_free(gc->def_surface);
free(gc->array.vertex);
free(gc->array.color);
free(gc->array.texuv);

View File

@ -38,7 +38,8 @@ static void
eng_info_free(Evas *e __UNUSED__, void *info)
{
Evas_Engine_Info_GL_X11 *in;
eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
// dont free! why bother? its not worth it
// eina_log_domain_unregister(_evas_engine_GL_X11_log_dom);
in = (Evas_Engine_Info_GL_X11 *)info;
free(in);
}
@ -1106,11 +1107,12 @@ module_open(Evas_Module *em)
if (!em) return 0;
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
_evas_engine_GL_X11_log_dom = eina_log_domain_register("EvasEngineGLX11", EVAS_DEFAULT_LOG_COLOR);
if(_evas_engine_GL_X11_log_dom<0)
if (_evas_engine_GL_X11_log_dom < 0)
_evas_engine_GL_X11_log_dom = eina_log_domain_register("EvasEngineGLX11", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_GL_X11_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for GL X11 engine.\n");
return 0;
EINA_LOG_ERR("Impossible to create a log domain for GL X11 engine.\n");
return 0;
}
/* store it for later use */
func = pfunc;