REM:
1. 数据包发送完成后释放内容
This commit is contained in:
huangxin 2022-06-10 17:24:18 +08:00
parent 538356cdec
commit 6225ab2644
1 changed files with 2 additions and 0 deletions

View File

@ -349,6 +349,8 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) {
written = sendto(rawif->fd, pBuf, outSize, 0, (struct sockaddr *)&dstAddr, sizeof(dstAddr)); written = sendto(rawif->fd, pBuf, outSize, 0, (struct sockaddr *)&dstAddr, sizeof(dstAddr));
} }
free(pBuf);
return written == (outSize) ? ERR_OK : ERR_IF; return written == (outSize) ? ERR_OK : ERR_IF;
#endif #endif
} else { } else {