Skip to content

Commit 096731f

Browse files
committed
Accels: free user_data in preset_iop_module_callback_destroyer()
That was allocated in dt_accel_connect_preset_iop() Fixes following LeakSanitizer-detected leak: Direct leak of 1616 byte(s) in 101 object(s) allocated from: #0 0x7fe9ab77474f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5474f) #1 0x7fe9a8d67799 in g_malloc (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4f799) #2 0x7fe9ab3afe5d in dt_iop_connect_common_accels /home/lebedevri/darktable/src/develop/imageop.c:2784 #3 0x7fe9874ec398 #4 0x7fe9ab4ebf54 in dt_view_manager_switch /home/lebedevri/darktable/src/views/view.c:401 #5 0x7fe9ab370506 in _dt_ctl_switch_mode_to /home/lebedevri/darktable/src/control/control.c:630 #6 0x7fe9a8d62be4 in g_main_context_invoke_full (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4abe4)
1 parent a2c39ca commit 096731f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gui/accelerators.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ static void preset_iop_module_callback_destroyer(gpointer data, GClosure *closur
533533
preset_iop_module_callback_description *callback_description
534534
= (preset_iop_module_callback_description *)data;
535535
g_free(callback_description->name);
536+
g_free(data);
536537
}
537538
static gboolean preset_iop_module_callback(GtkAccelGroup *accel_group, GObject *acceleratable, guint keyval,
538539
GdkModifierType modifier, gpointer data)

0 commit comments

Comments
 (0)