summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2023-03-28 13:27:02 +0200
committerDavid Tardon <dtardon@redhat.com>2023-04-11 16:30:07 +0200
commit04375b62139554c36fc8b919fd7df58add1041dc (patch)
tree6093e2cdb040724f2b3aaf019fb35bbf1ebc04ca /src/libsystemd
parent29933daf9ef3f49528bff4893d9f0c866a3b0370 (diff)
downloadsystemd-04375b62139554c36fc8b919fd7df58add1041dc.tar.gz
sd-bus: use CLEANUP_ARRAY
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 6ee8bb7a7f..cd9f33b5a9 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -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;