netipmid: use shared_ptr on session instead of shared_ptr+references
session objects were being created and held by shared_ptr objects and
then shared via reference. This is dangerous and sidesteps the whole
point of a shared_ptr, which is to share reference-counted ownership.
This replaces the usage with a shared_ptr, which shows shared ownership.
Change-Id: Ie22d812a6d260d606201eca6a9011e773c89e487
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/message_handler.cpp b/message_handler.cpp
index b9cc6ab..68c1b60 100644
--- a/message_handler.cpp
+++ b/message_handler.cpp
@@ -168,7 +168,7 @@
std::get<session::Manager&>(singletonPool).getSession(sessionID);
// Flatten the packet
- auto packet = parser::flatten(outMessage, sessionHeader, *session);
+ auto packet = parser::flatten(outMessage, sessionHeader, session);
// Write the packet
auto writeStatus = channel->write(packet);