mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: server: check if srv is NULL in free_server()
Check if srv is NULL before trying to do anything in free_server(), like most free()-like function do.
This commit is contained in:
parent
f95c29546c
commit
4c395fce21
@ -2216,6 +2216,9 @@ static uint srv_release_dynsrv(struct server *srv)
|
|||||||
*/
|
*/
|
||||||
void free_server(struct server *srv)
|
void free_server(struct server *srv)
|
||||||
{
|
{
|
||||||
|
if (!srv)
|
||||||
|
return;
|
||||||
|
|
||||||
/* For dynamic servers, decrement the reference counter. Only free the
|
/* For dynamic servers, decrement the reference counter. Only free the
|
||||||
* server when reaching zero.
|
* server when reaching zero.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user