Skip to content

Commit

Permalink
xxxgtk_textview_get_text must be g_freed after use
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Jun 30, 2023
1 parent 833a681 commit 5e37626
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gnucash/gnome-utils/gnc-option-gtk-ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ class GncGtkTextUIItem : public GncOptionGtkUIItem
void set_option_from_ui_item(GncOption& option) noexcept override
{
auto widget{GTK_TEXT_VIEW(get_widget())};
option.set_value(std::string{xxxgtk_textview_get_text(widget)});
auto str{xxxgtk_textview_get_text(widget)};
option.set_value(std::string{str});
g_free (str);
}
};

Expand Down

0 comments on commit 5e37626

Please sign in to comment.