Eolian: Fix Coverity issue.
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Thu, 5 Jun 2014 04:38:58 +0000 (07:38 +0300)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Thu, 5 Jun 2014 04:40:26 +0000 (07:40 +0300)
In a certain case, the function was returning without releasing all the
resources.

CID 1220084

src/bin/eolian/impl_generator.c

index 7083e9f..d3ec76e 100644 (file)
@@ -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);