summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2015-08-25 20:05:57 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-25 21:11:20 +0530
commit68aa6a5cb7f9b720d4a2342cee729f1328ede844 (patch)
tree297d878a3c55a67d5d7554964fca435fcd435ba5
parent40e0ea58e1d268383b47459cdd3279203f0b60f0 (diff)
progressbar: fix memory leak
Summary: when elm_progressbar_value_set is called, progress_status is always created. Test Plan: elementary_test -> progressbar Reviewers: woohyun, Hermet, cedric, raster Differential Revision: https://phab.enlightenment.org/D2986
-rw-r--r--src/lib/elm_progressbar.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/lib/elm_progressbar.c b/src/lib/elm_progressbar.c
index 1fbaab36c..aa34ec02f 100644
--- a/src/lib/elm_progressbar.c
+++ b/src/lib/elm_progressbar.c
@@ -424,20 +424,9 @@ _elm_progressbar_part_value_get(const Eo *obj EINA_UNUSED, Elm_Progressbar_Data
424EOLIAN static void 424EOLIAN static void
425_elm_progressbar_value_set(Eo *obj, Elm_Progressbar_Data *sd, double val) 425_elm_progressbar_value_set(Eo *obj, Elm_Progressbar_Data *sd, double val)
426{ 426{
427 Elm_Progress_Status *ps;
428
429 if (sd->val == val) return; 427 if (sd->val == val) return;
430 428
431 sd->val = val; 429 elm_progressbar_part_value_set(obj, "elm.cur.progressbar", val);
432 if (sd->val < MIN_RATIO_LVL) sd->val = MIN_RATIO_LVL;
433 if (sd->val > MAX_RATIO_LVL) sd->val = MAX_RATIO_LVL;
434
435 ps = _progress_status_new("elm.cur.progressbar", sd->val);
436 sd->progress_status = eina_list_append(sd->progress_status, ps);
437 _val_set(obj);
438 _units_set(obj);
439 eo_do(obj, eo_event_callback_call
440 (ELM_PROGRESSBAR_EVENT_CHANGED, NULL));
441} 430}
442 431
443EOLIAN static double 432EOLIAN static double