[gnome-control-center] keyboard-shortcut-editor: fix leak of accel string
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard-shortcut-editor: fix leak of accel string
- Date: Fri, 17 Dec 2021 12:19:25 +0000 (UTC)
commit 8355404ed4694860a76ffe8707f903de43fa8566
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 8d3546d0e..25441f194 100644
--- a/panels/keyboard/cc-keyboard-shortcut-editor.c
+++ b/panels/keyboard/cc-keyboard-shortcut-editor.c
@@ -309,7 +309,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]