mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-04 00:25:08 -04:00
BUG/MEDIUM: config: fix parser crash with bad bind or server address
If an address is improperly formated on a bind or server address and haproxy is built for using getaddrinfo, then a crash may occur upon the call to freeaddrinfo(). Thanks to Jon Meredith for helping me patch this for SmartOS, I am not a C/GDB wizard.
This commit is contained in:
parent
0defb90784
commit
58ea039115
1 changed files with 2 additions and 1 deletions
|
|
@ -600,7 +600,8 @@ struct sockaddr_storage *str2ip(const char *str)
|
|||
}
|
||||
}
|
||||
|
||||
freeaddrinfo(result);
|
||||
if (result)
|
||||
freeaddrinfo(result);
|
||||
}
|
||||
#endif
|
||||
/* unsupported address family */
|
||||
|
|
|
|||
Loading…
Reference in a new issue