summaryrefslogtreecommitdiffstats
path: root/message.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-04-30 17:58:11 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-04-30 17:58:20 -0700
commit57489437e0eb3057d34030325c784d6ac2dbf3fe (patch)
tree03f264c80e8c8c1018ba65aacbe255903b47e732 /message.h
parent8e97722e96916a8a2f444645bac4a6ea5434c262 (diff)
libqtappfw: message: fix memory leak with QJsonArray
QJsonArray object was being allocated on the heap and never freed. Switch to having a m_request member field and confirming it is only populated with data once. Change-Id: I60f406eff032650cac878efa7e1db61ee18e2eb2 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'message.h')
-rw-r--r--message.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/message.h b/message.h
index 64bb69f..37dc740 100644
--- a/message.h
+++ b/message.h
@@ -18,6 +18,7 @@
#define MESSAGE_H
#include <QObject>
+#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
@@ -92,6 +93,7 @@ class Message : public QObject
protected:
bool m_event, m_init, m_reply;
QString m_event_api, m_event_name, m_reply_info, m_reply_status, m_reply_uuid;
+ QJsonArray m_request;
QJsonDocument m_jdoc;
QJsonObject m_event_data, m_reply_data;
};