We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e40ba3 commit 54c73f8Copy full SHA for 54c73f8
src/plugins/core/scripting/usermessage.cpp
@@ -81,18 +81,14 @@ PluginUserMessage::PluginUserMessage(std::string msgname)
81
return;
82
83
this->msgid = msginfo->m_MessageId;
84
- this->msgBuffer = msg->AllocateMessage()->ToPB<google::protobuf::Message>();
+ auto cnetmsg = msg->AllocateMessage();
85
+ this->msgBuffer = cnetmsg->ToPB<google::protobuf::Message>();
86
+ delete cnetmsg;
87
this->internalMsg = msg;
88
}
89
90
PluginUserMessage::~PluginUserMessage()
91
{
- if (!this->internalMsg)
- return;
92
- if (!this->msgBuffer)
93
94
-
95
- this->internalMsg->DeallocateMessage(this->msgBuffer);
96
97
98
bool PluginUserMessage::IsValidMessage()
0 commit comments