[gnome-shell/gnome-3-36] st/entry: Fix leak when copying or cutting text using shortcuts
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-36] st/entry: Fix leak when copying or cutting text using shortcuts
- Date: Mon, 8 Jun 2020 15:33:00 +0000 (UTC)
commit b2454bd1b2713bf46b47b81de79efd3b3eb95304
Author: Sebastian Keller <skeller gnome org>
Date: Sun Jun 7 22:42:00 2020 +0000
st/entry: Fix leak when copying or cutting text using shortcuts
clutter_text_get_selection() creates a copy of the selected text which
gets passed to st_clipboard_set_text() which creates its own copy. The
copy returned by clutter_text_get_selection() however never got free'd.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1306
(cherry picked from commit fdfcacf1db70df6dfe214838c65f5f6e329d27ee)
src/st/st-entry.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index c7050a3595..051d3a1320 100644
--- a/src/st/st-entry.c
+++ b/src/st/st-entry.c
@@ -679,6 +679,8 @@ st_entry_key_press_event (ClutterActor *actor,
ST_CLIPBOARD_TYPE_CLIPBOARD,
text);
+ g_free (text);
+
return TRUE;
}
@@ -705,6 +707,8 @@ st_entry_key_press_event (ClutterActor *actor,
clutter_text_delete_selection ((ClutterText *) priv->entry);
}
+ g_free (text);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]