mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-08 07:33:53 +01:00
ratbagd: clean up ratbag devices on SIGINT
Or valgrind complains a lot. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -306,8 +306,10 @@ static struct ratbagd *ratbagd_free(struct ratbagd *ctx)
|
||||
if (!ctx)
|
||||
return NULL;
|
||||
|
||||
RATBAGD_DEVICE_FOREACH_SAFE(device, tmp, ctx)
|
||||
RATBAGD_DEVICE_FOREACH_SAFE(device, tmp, ctx) {
|
||||
ratbagd_device_unlink(device);
|
||||
ratbagd_device_free(device);
|
||||
}
|
||||
|
||||
ctx->bus = sd_bus_flush_close_unref(ctx->bus);
|
||||
ctx->monitor_source = sd_event_source_unref(ctx->monitor_source);
|
||||
|
||||
Reference in New Issue
Block a user