mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04: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
1 changed files with 3 additions and 0 deletions
|
|
@ -2216,6 +2216,9 @@ static uint srv_release_dynsrv(struct server *srv)
|
|||
*/
|
||||
void free_server(struct server *srv)
|
||||
{
|
||||
if (!srv)
|
||||
return;
|
||||
|
||||
/* For dynamic servers, decrement the reference counter. Only free the
|
||||
* server when reaching zero.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue