diff options
author | Sungtaek Hong <sth253.hong@samsung.com> | 2017-03-07 13:13:38 +0900 |
---|---|---|
committer | Sungtaek Hong <sth253.hong@samsung.com> | 2017-03-07 13:16:22 +0900 |
commit | a9de7ba5bc7cae8890237e9f49a01a7949ce3393 (patch) | |
tree | b004cb47c36f11b57d6004b68a4e7fb6649e7f46 | |
parent | b18f64bdc7f5f240b74cd9132a49c3e3f9db5a30 (diff) | |
download | efl-modules-accepted/tizen_mobile.tar.gz efl-modules-accepted/tizen_mobile.tar.bz2 efl-modules-accepted/tizen_mobile.zip |
fix potential memory leak in edje_feedbacksubmit/tizen_unified/20170310.011402submit/tizen/20170309.113228accepted/tizen/unified/20170310.080533accepted/tizen/mobile/20170310.031458accepted/tizen_mobile
- eina_str_split_full() malloc twice :
tok, tok[0].
- if the API returns tok, it always mallok tok[0]
which should be also freed.
Change-Id: Id9ce3ec1d4a7f005120bb4942956c438c4bbcba1
Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>
-rw-r--r-- | edje_feedback/feedback.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/edje_feedback/feedback.c b/edje_feedback/feedback.c index 37a58d9..9942ef5 100644 --- a/edje_feedback/feedback.c +++ b/edje_feedback/feedback.c @@ -83,7 +83,12 @@ edje_plugin_run(Evas_Object *edje, } return EINA_TRUE; } - free(tok); + if (tok) + { + free(tok[0]); + free(tok); + } + return EINA_FALSE; } |