mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
This commit is contained in:
parent
d3efbcce9b
commit
fdfcacf1db
1 changed files with 4 additions and 0 deletions
|
|
@ -678,6 +678,8 @@ st_entry_key_press_event (ClutterActor *actor,
|
|||
ST_CLIPBOARD_TYPE_CLIPBOARD,
|
||||
text);
|
||||
|
||||
g_free (text);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -704,6 +706,8 @@ st_entry_key_press_event (ClutterActor *actor,
|
|||
clutter_text_delete_selection ((ClutterText *) priv->entry);
|
||||
}
|
||||
|
||||
g_free (text);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue