mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-22 01:47:51 -04:00
BUG/MINOR: ssl: fix memory leak on realloc failure in acme.ips
Some checks failed
Contrib / admin/halog/ (push) Has been cancelled
Contrib / dev/flags/ (push) Has been cancelled
Contrib / dev/haring/ (push) Has been cancelled
Contrib / dev/hpack/ (push) Has been cancelled
Contrib / dev/poll/ (push) Has been cancelled
VTest / Generate Build Matrix (push) Has been cancelled
Windows / Windows, gcc, all features (push) Has been cancelled
VTest / (push) Has been cancelled
Some checks failed
Contrib / admin/halog/ (push) Has been cancelled
Contrib / dev/flags/ (push) Has been cancelled
Contrib / dev/haring/ (push) Has been cancelled
Contrib / dev/hpack/ (push) Has been cancelled
Contrib / dev/poll/ (push) Has been cancelled
VTest / Generate Build Matrix (push) Has been cancelled
Windows / Windows, gcc, all features (push) Has been cancelled
VTest / (push) Has been cancelled
Fix a realloc() bug in ckchs_dup() when copying the acme.ips array, where overwriting the original pointer with NULL on allocation failure loses reference to the original memory block. Use my_realloc2() which safely handles the failure. No backport needed.
This commit is contained in:
parent
90bfbea7c0
commit
fa17a50c62
1 changed files with 1 additions and 1 deletions
|
|
@ -1119,7 +1119,7 @@ struct ckch_store *ckchs_dup(const struct ckch_store *src)
|
|||
/* copy the array of IP strings */
|
||||
|
||||
while (src->conf.acme.ips[n]) {
|
||||
r = realloc(r, sizeof(char *) * (n + 2));
|
||||
r = my_realloc2(r, sizeof(char *) * (n + 2));
|
||||
if (!r)
|
||||
goto error;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue