mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:50:29 +00:00
Merge pull request #2522 from pacovn/Coverity_1399277_Explicit_null_dereferenced
lib: null check (Coverity 1399277)
This commit is contained in:
commit
1337a02851
@ -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