mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
lib: null check (Coverity 1399277)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
eab268594a
commit
d1f92e454c
@ -46,6 +46,9 @@ int str2sockunion(const char *str, union sockunion *su)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (str == NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
memset(su, 0, sizeof(union sockunion));
|
memset(su, 0, sizeof(union sockunion));
|
||||||
|
|
||||||
ret = inet_pton(AF_INET, str, &su->sin.sin_addr);
|
ret = inet_pton(AF_INET, str, &su->sin.sin_addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user