summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-10-16 17:58:03 -0500
committerPatrick Williams <patrick@stwcx.xyz>2016-10-20 16:04:37 -0500
commit67df0f24ceec6a49922d7b0bb73dad75b4279691 (patch)
tree4e6ee132ae9723e592a86ba39b24ebcb501148ff
parentcae30a01a61e464407ad0d29ae69f63b02d72460 (diff)
downloadsdbusplus-67df0f24ceec6a49922d7b0bb73dad75b4279691.tar.gz
sdbusplus-67df0f24ceec6a49922d7b0bb73dad75b4279691.zip
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>
-rw-r--r--sdbusplus/bus.hpp2
1 files changed, 1 insertions, 1 deletions
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 @@ struct BusDeleter
{
void operator()(sd_bus* ptr) const
{
- sd_bus_flush_close_unref(ptr);
+ sd_bus_unref(ptr);
}
};
OpenPOWER on IntegriCloud