]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
bus_container_instance_new: Don't leak empty DBusString object
authorSimon McVittie <smcv@collabora.com>
Fri, 17 Aug 2018 14:37:36 +0000 (15:37 +0100)
committerSimon McVittie <smcv@collabora.com>
Mon, 19 Nov 2018 11:35:22 +0000 (11:35 +0000)
We already stole its data, but that allocated a new buffer, which we
still need to free.

Signed-off-by: Simon McVittie <smcv@collabora.com>
bus/containers.c

index 5542e16bc677bda4357cf1befc95945c69c7f95c..213ce3c9381f051c34e47a8ac04f0939b8ffccc8 100644 (file)
@@ -425,6 +425,7 @@ bus_container_instance_new (BusContext *context,
   if (!_dbus_string_steal_data (&path, &self->path))
     goto fail;
 
+  _dbus_string_free (&path);
   return self;
 
 fail: