mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUG/MEDIUM: dns: don't randomly crash on out-of-memory
dns_init_resolvers() tries to emit the current resolver's name in the error message in case of out-of-memory condition. But it must not do it when initializing the trash before even having such a resolver otherwise the user is certain to get a dirty crash instead of the error message. No backport is needed.
This commit is contained in:
parent
1f6367fa08
commit
c3d8cd47e0
@ -928,7 +928,7 @@ int dns_init_resolvers(void)
|
|||||||
|
|
||||||
dns_trash_str = malloc(global.tune.bufsize);
|
dns_trash_str = malloc(global.tune.bufsize);
|
||||||
if (dns_trash_str == NULL) {
|
if (dns_trash_str == NULL) {
|
||||||
Alert("Starting [%s] resolvers: out of memory.\n", curr_resolvers->id);
|
Alert("Starting resolvers: out of memory.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user