summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-05-18 08:25:12 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-05-18 08:26:50 +0300
commitce33c77315929b58ee5e1685523a2860208e68b1 (patch)
tree1b19d162720cd604140d313bf038bfde060c267e
parentda3b2b1274927e995f43b74434068063ea2d5ff8 (diff)
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
-rw-r--r--src/lib/elm_label.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 56fdf7801..9a2b7070b 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -345,10 +345,9 @@ _access_info_cb(void *data EINA_UNUSED, Evas_Object *obj)
345{ 345{
346 const char *txt = elm_widget_access_info_get(obj); 346 const char *txt = elm_widget_access_info_get(obj);
347 347
348 if (!txt) txt = _elm_util_mkup_to_text(elm_layout_text_get(obj, NULL)); 348 if (!txt)
349 if (txt) return strdup(txt); 349 return _elm_util_mkup_to_text(elm_layout_text_get(obj, NULL));
350 350 else return strdup(txt);
351 return NULL;
352} 351}
353 352
354static void 353static void