jackdanielz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=ce33c77315929b58ee5e1685523a2860208e68b1
commit ce33c77315929b58ee5e1685523a2860208e68b1 Author: Amitesh Singh <[email protected]> Date: Mon May 18 08:25:12 2015 +0300 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 --- src/lib/elm_label.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c index 56fdf78..9a2b707 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) { 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 --
