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
This commit is contained in:
Hosang Kim 2015-08-25 20:05:57 +09:00 committed by WooHyun Jung
parent 4517e70a5e
commit 176f2ba06a
1 changed files with 1 additions and 12 deletions

View File

@ -424,20 +424,9 @@ _elm_progressbar_part_value_get(const Eo *obj EINA_UNUSED, Elm_Progressbar_Data
EOLIAN static void
_elm_progressbar_value_set(Eo *obj, Elm_Progressbar_Data *sd, double val)
{
Elm_Progress_Status *ps;
if (sd->val == val) return;
sd->val = val;
if (sd->val < MIN_RATIO_LVL) sd->val = MIN_RATIO_LVL;
if (sd->val > MAX_RATIO_LVL) sd->val = MAX_RATIO_LVL;
ps = _progress_status_new("elm.cur.progressbar", sd->val);
sd->progress_status = eina_list_append(sd->progress_status, ps);
_val_set(obj);
_units_set(obj);
eo_do(obj, eo_event_callback_call
(ELM_PROGRESSBAR_EVENT_CHANGED, NULL));
elm_progressbar_part_value_set(obj, "elm.cur.progressbar", val);
}
EOLIAN static double