bus: change destructor to just 'unref'
Previously the bus destructor called sdbus_flush_close_unref.
This is inappropriate because bus objects can be created through
a duplicated reference, for example, using sd_bus_message_get_bus().
Therefore, there is no certainty that there is only 1 reference to
the same underlying sd_bus_t, which makes the flush/close incorrect.
Change-Id: I2d3aac2f79f47ecb881a8f4bfb7bddb5686ae740
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/sdbusplus/bus.hpp b/sdbusplus/bus.hpp
index 24e9211..bbbf831 100644
--- a/sdbusplus/bus.hpp
+++ b/sdbusplus/bus.hpp
@@ -28,7 +28,7 @@
{
void operator()(sd_bus* ptr) const
{
- sd_bus_flush_close_unref(ptr);
+ sd_bus_unref(ptr);
}
};