label: Fix memory leak.

Summary:
Fix memory leak when txt is NULL.

@fix

Reviewers: raster, seoz, Hermet, JackDanielZ

Reviewed By: JackDanielZ

Subscribers: JackDanielZ, seoz, sachin.dev

Differential Revision: https://phab.enlightenment.org/D2460
This commit is contained in:
Amitesh Singh 2015-05-18 08:25:12 +03:00 committed by Daniel Zaoui
parent 7188d3bfd9
commit ef01775db8
1 changed files with 3 additions and 4 deletions

View File

@ -345,10 +345,9 @@ _access_info_cb(void *data EINA_UNUSED, Evas_Object *obj)
{
const char *txt = elm_widget_access_info_get(obj);
if (!txt) txt = _elm_util_mkup_to_text(elm_layout_text_get(obj, NULL));
if (txt) return strdup(txt);
return NULL;
if (!txt)
return _elm_util_mkup_to_text(elm_layout_text_get(obj, NULL));
else return strdup(txt);
}
static void