mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-24 00:48:53 +03:00
g_assert() is compiled out when G_DISABLE_ASSERT is defined, which would
cause the g_tree_remove() call to disappear entirely, leading to ID leaks
and eventual resource exhaustion. Move the side-effecting call outside
the assertion, consistent with the pattern used elsewhere in the daemon.
Fixes: a5ab76da1e ("dbus: add the D-Bus daemon, command-line client and tests")
Assisted-by: Claude Opus 4.6
Reviewed-by: Vincent Fazio <vfazio@xes-inc.com>
Tested-by: Vincent Fazio <vfazio@xes-inc.com>
Link: https://patch.msgid.link/20260604-pre-2-3-fixes-v2-15-781bcaf47475@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>