dbus: client: notify: fix reference counting
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 7 Oct 2024 19:30:22 +0000 (21:30 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 9 Oct 2024 07:33:36 +0000 (09:33 +0200)
commitc87847b23b398d0b62185cd8191aaa09113debdb
tree76b4a1d5840da1089025be7e2b823cd25e21be8e
parent0e4198b9eef1eeedf8cf12e970b36d4e50a1da48
dbus: client: notify: fix reference counting

There's a reference overflow when adding chips to the global list and an
underflow when fetching existing chips from that list in connect_line().
Fix both issues.

Fixes: a5ab76da1e0a ("dbus: add the D-Bus daemon, command-line client and tests")
Link: https://lore.kernel.org/r/20241007-dbus-memory-fixes-v1-1-0d56d1aa032d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
dbus/client/notify.c