Summary:
This fixes memory leak in case of txt is NULL
@Fix
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
Reviewers: seoz, raster, Hermet
Subscribers: seoz, sachin.dev
Differential Revision: https://phab.enlightenment.org/D2459
txt = elm_widget_access_info_get(obj);
- if (!txt) txt = _elm_util_mkup_to_text(elm_entry_entry_get(obj));
- if (txt) return strdup(txt);
-
- return NULL;
+ if (!txt)
+ {
+ char *ret, *ret2;
+ ret = _elm_util_mkup_to_text(elm_entry_entry_get(obj));
+ ret2 = strdup(ret);
+ free(ret);
+ return ret2;
+ }
+ else return strdup(txt);
}
static char *