projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f95c295
)
MINOR: server: check if srv is NULL in free_server()
author
William Lallemand
<wlallemand@haproxy.org>
Fri, 20 Aug 2021 08:10:15 +0000
(10:10 +0200)
committer
William Lallemand
<wlallemand@haproxy.org>
Fri, 20 Aug 2021 08:20:51 +0000
(10:20 +0200)
Check if srv is NULL before trying to do anything in free_server(),
like most free()-like function do.
src/server.c
patch
|
blob
|
history
diff --git
a/src/server.c
b/src/server.c
index
f1e294a
..
7cec4ce
100644
(file)
--- a/
src/server.c
+++ b/
src/server.c
@@
-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.
*/