mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-17 17:04:35 +00:00
BUG/MINOR: check: test if server is not null in purge
Test if server is not null before using free_server in the check purge operation. Currently, the null server scenario should not occured as purge is used with refcounted dynamic servers. However, this might not be always the case if purge is use in the future in other cases; thus the test is useful for extensibility. No need to backport, unless dynamic server checks are backported. This has been reported through a coverity report in github issue #1343.
This commit is contained in:
parent
811ce5598e
commit
9ba34ae710
@ -1253,7 +1253,8 @@ struct task *process_chk_conn(struct task *t, void *context, unsigned int state)
|
||||
task_destroy(check->task);
|
||||
t = NULL;
|
||||
|
||||
free_server(check->server);
|
||||
if (check->server)
|
||||
free_server(check->server);
|
||||
}
|
||||
|
||||
return t;
|
||||
|
Loading…
Reference in New Issue
Block a user