From: David Tardon Date: Tue, 28 Mar 2023 11:27:02 +0000 (+0200) Subject: sd-bus: use CLEANUP_ARRAY X-Git-Tag: v254-rc1~752^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04375b62139554c36fc8b919fd7df58add1041dc;p=thirdparty%2Fsystemd.git sd-bus: use CLEANUP_ARRAY --- diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 6ee8bb7a7ff..cd9f33b5a95 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;