sd-bus: use CLEANUP_ARRAY

This commit is contained in:
David Tardon
2023-04-11 16:30:07 +02:00
parent 29933daf9e
commit 04375b6213
+2 -1
View File
@@ -3520,6 +3520,8 @@ static int bus_add_match_full(
assert_return(match, -EINVAL);
assert_return(!bus_pid_changed(bus), -ECHILD);
CLEANUP_ARRAY(components, n_components, bus_match_parse_free);
r = bus_match_parse(match, &components, &n_components);
if (r < 0)
goto finish;
@@ -3582,7 +3584,6 @@ static int bus_add_match_full(
s = NULL;
finish:
bus_match_parse_free(components, n_components);
sd_bus_slot_unref(s);
return r;