mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
sntp_send_request: assert that argument 'server_addr' != NULL
This commit is contained in:
parent
ba270c2414
commit
82483073f0
@ -532,6 +532,9 @@ static void
|
||||
sntp_send_request(const ip_addr_t *server_addr)
|
||||
{
|
||||
struct pbuf *p;
|
||||
|
||||
LWIP_ASSERT("server_addr != NULL", server_addr != NULL);
|
||||
|
||||
p = pbuf_alloc(PBUF_TRANSPORT, SNTP_MSG_LEN, PBUF_RAM);
|
||||
if (p != NULL) {
|
||||
struct sntp_msg *sntpmsg = (struct sntp_msg *)p->payload;
|
||||
|
Loading…
Reference in New Issue
Block a user