From 97913753ea8dbb9eb544e69c96f4fbabe9347427 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Thu, 5 Jun 2014 07:38:58 +0300 Subject: [PATCH] Eolian: Fix Coverity issue. In a certain case, the function was returning without releasing all the resources. CID 1220084 --- src/bin/eolian/impl_generator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/eolian/impl_generator.c b/src/bin/eolian/impl_generator.c index 7083e9f..d3ec76e 100644 --- a/src/bin/eolian/impl_generator.c +++ b/src/bin/eolian/impl_generator.c @@ -133,7 +133,7 @@ _prototype_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Strbuf impl_desc?impl_name:class_env.lower_classname, eolian_function_name_get(foo), ftype == EOLIAN_PROP_GET?"_get": (ftype == EOLIAN_PROP_SET?"_set":"")); - if (_function_exists(func_name, buffer)) return EINA_TRUE; + if (_function_exists(func_name, buffer)) goto end; printf("Generation of function %s\n", func_name); const char *rettype = eolian_function_return_type_get(foo, ftype); @@ -175,6 +175,7 @@ _prototype_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Strbuf eina_strbuf_string_get(super_invok) ); +end: eina_strbuf_free(short_params); eina_strbuf_free(params); eina_strbuf_free(super_invok); -- 2.7.4