[gnome-control-center/gnome-41] keyboard-shortcut-editor: fix leak of accel string
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-41] keyboard-shortcut-editor: fix leak of accel string
- Date: Fri, 27 May 2022 03:09:29 +0000 (UTC)
commit e8650a56103fc491faf06b86aa73f04ff01f438f
Author: Victor Toso <victortoso redhat com>
Date: Tue Oct 12 14:09:45 2021 +0200
keyboard-shortcut-editor: fix leak of accel string
==31571== 120 bytes in 8 blocks are definitely lost in loss record 17,034 of 19,290
==31571== at 0x484086F: malloc (vg_replace_malloc.c:380)
==31571== by 0x4AF77A8: g_malloc (gmem.c:106)
==31571== by 0x4D9816A: gtk_accelerator_name (gtkaccelgroup.c:1577)
==31571== by 0x4A82D1: setup_custom_shortcut (cc-keyboard-shortcut-editor.c:364)
==31571== by 0x4A92DF: cc_keyboard_shortcut_editor_key_press_event (cc-keyboard-shortcut-editor.c:745)
panels/keyboard/cc-keyboard-shortcut-editor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/keyboard/cc-keyboard-shortcut-editor.c b/panels/keyboard/cc-keyboard-shortcut-editor.c
index 6b42763e3..4e93a1c20 100644
--- a/panels/keyboard/cc-keyboard-shortcut-editor.c
+++ b/panels/keyboard/cc-keyboard-shortcut-editor.c
@@ -308,7 +308,7 @@ setup_custom_shortcut (CcKeyboardShortcutEditor *self)
HeaderMode mode;
gboolean is_custom, is_accel_empty;
gboolean valid, accel_valid;
- gchar *accel;
+ g_autofree char *accel = NULL;
is_custom = is_custom_shortcut (self);
accel_valid = is_valid_binding (self->custom_combo) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]