]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: Fix introspect memory leak
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 19 May 2022 21:59:50 +0000 (23:59 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 20 May 2022 05:53:28 +0000 (14:53 +0900)
We have to free the contents of the set on top of the set itself.

Fixes #23443.

src/libsystemd/sd-bus/bus-objects.c

index e06a05db4bf46a8a4beb872b3290bf650933e4bc..909dfe4d3a3ff7538b562acf81e931591b648a85 100644 (file)
@@ -926,7 +926,7 @@ int introspect_path(
                 char **ret,
                 sd_bus_error *error) {
 
-        _cleanup_ordered_set_free_ OrderedSet *s = NULL;
+        _cleanup_ordered_set_free_free_ OrderedSet *s = NULL;
         _cleanup_(introspect_free) struct introspect intro = {};
         bool empty;
         int r;