diff --git a/include/CommonAPI/DBus/DBusInputStream.hpp b/include/CommonAPI/DBus/DBusInputStream.hpp index 568dc4d..09b39bb 100644 --- a/include/CommonAPI/DBus/DBusInputStream.hpp +++ b/include/CommonAPI/DBus/DBusInputStream.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -518,7 +519,7 @@ class DBusInputStream char *begin_; size_t current_; size_t size_; - CommonAPI::DBus::DBusError* exception_; + std::unique_ptr exception_; CommonAPI::DBus::DBusMessage message_; std::vector sizes_; diff --git a/src/CommonAPI/DBus/DBusInputStream.cpp b/src/CommonAPI/DBus/DBusInputStream.cpp index 1bede6f..5a9ca20 100644 --- a/src/CommonAPI/DBus/DBusInputStream.cpp +++ b/src/CommonAPI/DBus/DBusInputStream.cpp @@ -49,7 +49,7 @@ char *DBusInputStream::_readRaw(const size_t _size) { } void DBusInputStream::setError() { - exception_ = new CommonAPI::DBus::DBusError(); + exception_ = std::unique_ptr(new CommonAPI::DBus::DBusError()); } void DBusInputStream::pushPosition() {