From d43c6b5a75bd87e6933835e375fb76ed6f71741b Mon Sep 17 00:00:00 2001
From: Piotr Sawicki
Date: Fri, 7 Jul 2017 09:40:48 +0200
Subject: [PATCH] Free remaining callbacks while destroying a client
After calling a registered callback it has to be freed
to prevent from calling it again.
Change-Id: Iacd1e345f4e1ff43827044c461d6cb6db75a5911
---
src/client/impl/ApiInterfaceImpl.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/client/impl/ApiInterfaceImpl.cpp b/src/client/impl/ApiInterfaceImpl.cpp
index 24dfad6..393924e 100644
--- a/src/client/impl/ApiInterfaceImpl.cpp
+++ b/src/client/impl/ApiInterfaceImpl.cpp
@@ -78,6 +78,8 @@ ApiInterfaceImpl::~ApiInterfaceImpl()
closure.second(closure.first, askuser_call_cause::ASKUSER_CALL_CAUSE_FINALIZE,
askuser_popup_result::ASKUSER_POPUP_RESULT_DENY_ONCE);
}
+
+ m_callbacks.clear();
}
int ApiInterfaceImpl::process(int fd, int events)
--
2.7.4