forked from enlightenment/efl
elementary: Fix coverity detected resource leak
As elm_code_line_indent_get will malloc space for the returned string, that space should be freed after usage. This fixes a resource leak detected by Coverity. CID1366468 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
03f20efaf0
commit
2c7bedc622
|
@ -1319,6 +1319,7 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
|
|||
strlen(leading));
|
||||
elm_obj_code_widget_cursor_position_set(widget, indent, row + 1);
|
||||
efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
|
||||
free(leading);
|
||||
|
||||
change = _elm_code_widget_change_create(width + 1, row, indent - 1, row + 1, "\n", 1, EINA_TRUE);
|
||||
_elm_code_widget_undo_change_add(widget, change);
|
||||
|
|
Loading…
Reference in New Issue