Change SendDatagram to not free the message on error. (#16)

The caller should be responsible for freeing the message buffer.
This commit is contained in:
Jonathan Hui
2016-05-11 17:01:38 -07:00
parent 3c6d23d7ba
commit 3a439e56b4
2 changed files with 22 additions and 8 deletions
+1 -5
View File
@@ -172,11 +172,7 @@ ThreadError Ip6::SendDatagram(Message &message, MessageInfo &messageInfo, IpProt
exit:
if (error != kThreadError_None)
{
Message::Free(message);
}
else
if (error == kThreadError_None)
{
error = HandleDatagram(message, NULL, messageInfo.mInterfaceId, NULL, false);
}