Skip to content

lock-plug: Fix GVariant leak when switching user

Leak report

64 bytes in 1 blocks are definitely lost in loss record 8,243 of 12,483
   at 0x48447A8: malloc (vg_replace_malloc.c:446)
   by 0x5364661: g_malloc (gmem.c:100)
   by 0x537C7DB: g_slice_alloc (gslice.c:193)
   by 0x53A5FA3: g_variant_alloc (gvariant-core.c:560)
   by 0x53A6320: g_variant_new_from_children (gvariant-core.c:711)
   by 0x53A2AEF: g_variant_builder_end (gvariant.c:3777)
   by 0x53A44DC: g_variant_valist_new (gvariant.c:5314)
   by 0x53A4934: g_variant_new_va (gvariant.c:5487)
   by 0x53A4A64: g_variant_new (gvariant.c:5422)
   by 0x51FB014: decode_method_reply (gdbusconnection.c:6232)
   by 0x5201ACA: g_dbus_connection_call_sync_internal (gdbusconnection.c:6610)
   by 0x520431E: g_dbus_connection_call_with_unix_fd_list_sync (gdbusconnection.c:6946)
   by 0x520EDD1: g_dbus_proxy_call_sync_internal (gdbusproxy.c:2832)
   by 0x52100AD: g_dbus_proxy_call_sync (gdbusproxy.c:3024)
   by 0x115474: do_user_switch (gs-lock-plug.c:258)
   by 0x115474: switch_user_button_clicked (gs-lock-plug.c:1441)
[...snip...]

Testing

  • No issues were detected when testing the patch with Valgrind

Merge request reports

Loading