summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-07-08 13:25:32 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-07-08 13:25:32 +0100
commitc31a57db00173689c60543a9838479a16b93ac91 (patch)
tree11be3c2a840cf2485e92d70ac325b71033a20f6e
parent42156a7c34903beb40920368ae9027c3276a6a23 (diff)
eolian/generator: delete a stringshare correctly on failure
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/docs_generator.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/eolian/docs_generator.c b/src/bin/eolian/docs_generator.c
index 9e4e66ec05..68045dedf0 100644
--- a/src/bin/eolian/docs_generator.c
+++ b/src/bin/eolian/docs_generator.c
@@ -45,7 +45,11 @@ _generate_ref(const char *refn, Eina_Strbuf *wbuf, Eina_Bool use_legacy)
45 const Eolian_Type *tp = eolian_type_struct_get_by_name(bname); 45 const Eolian_Type *tp = eolian_type_struct_get_by_name(bname);
46 if (tp) 46 if (tp)
47 { 47 {
48 if (!eolian_type_struct_field_get(tp, sfx + 1)) goto noref; 48 if (!eolian_type_struct_field_get(tp, sfx + 1))
49 {
50 eina_stringshare_del(bname);
51 goto noref;
52 }
49 _generate_ref(bname, wbuf, use_legacy); 53 _generate_ref(bname, wbuf, use_legacy);
50 eina_strbuf_append(wbuf, sfx); 54 eina_strbuf_append(wbuf, sfx);
51 eina_stringshare_del(bname); 55 eina_stringshare_del(bname);
@@ -56,7 +60,11 @@ _generate_ref(const char *refn, Eina_Strbuf *wbuf, Eina_Bool use_legacy)
56 if (tp) 60 if (tp)
57 { 61 {
58 const Eolian_Enum_Type_Field *efl = eolian_type_enum_field_get(tp, sfx + 1); 62 const Eolian_Enum_Type_Field *efl = eolian_type_enum_field_get(tp, sfx + 1);
59 if (!efl) goto noref; 63 if (!efl)
64 {
65 eina_stringshare_del(bname);
66 goto noref;
67 }
60 _generate_ref(bname, wbuf, use_legacy); 68 _generate_ref(bname, wbuf, use_legacy);
61 Eina_Stringshare *str = eolian_type_enum_field_c_name_get(efl); 69 Eina_Stringshare *str = eolian_type_enum_field_c_name_get(efl);
62 eina_strbuf_append_char(wbuf, '.'); 70 eina_strbuf_append_char(wbuf, '.');