diff options
author | Chris Michael <cp.michael@samsung.com> | 2017-12-11 14:49:29 -0500 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2017-12-11 14:49:29 -0500 |
commit | 13d29eda9850e73bf70f1625ccd5248cc9ab2c75 (patch) | |
tree | 1d14e264e600641b6f47abc69af01545850b43cb /src | |
parent | 18429454326150e45560354f19c553694ba5b45e (diff) | |
download | efl-13d29eda9850e73bf70f1625ccd5248cc9ab2c75.tar.gz |
elementary: Fix resource leak
Coverity reports a resource leak here. According to eina_strbuf
documentation, the result of eina_strbuf_release should be
free'd when not needed anymore.
Fixes Coverity CID1383550
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/elementary/efl_ui_slider.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c index a855757960..9f2926933d 100644 --- a/src/lib/elementary/efl_ui_slider.c +++ b/src/lib/elementary/efl_ui_slider.c @@ -1129,6 +1129,7 @@ EOLIAN static void _efl_ui_slider_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Slider_Data *priv) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); + char *group; if (!elm_widget_theme_klass_get(obj)) elm_widget_theme_klass_set(obj, "slider"); @@ -1143,12 +1144,16 @@ _efl_ui_slider_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Slider_Data *priv) priv->wheel_indicator_duration = 0.25; priv->step = SLIDER_STEP; + group = _efl_ui_slider_theme_group_get(obj, priv); + if (!elm_widget_theme_object_set(obj, wd->resize_obj, elm_widget_theme_klass_get(obj), - _efl_ui_slider_theme_group_get(obj, priv), + group, elm_widget_theme_style_get(obj))) CRI("Failed to set layout!"); + free(group); + elm_layout_signal_callback_add(obj, "drag", "*", _drag, obj); elm_layout_signal_callback_add(obj, "drag,start", "*", _drag_start, obj); elm_layout_signal_callback_add(obj, "drag,stop", "*", _drag_stop, obj); |