mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 17:17:45 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user