BUG/MINOR: tools: Fix a memory leak on error path in parse_dotted_uints()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 11 Feb 2021 09:42:41 +0000 (10:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Feb 2021 15:54:29 +0000 (16:54 +0100)
commit498d36db3fadd987ec78e5660d15a85452b6e4d4
treee68b88340ff185a57a74d18ea2d594d60c9432ed
parent6d45218d700da2b0b84fce300a4127d4b796cef7
BUG/MINOR: tools: Fix a memory leak on error path in parse_dotted_uints()

When an invalid character is found during parsing in parse_dotted_uints()
function, the allocated array of uint must be released. This patch fixes a
memory leak on error path during the configuration parsing.

This patch should fix the issue #1106. It should be backported as far as
2.0. Note that, for 2.1 and 2.0, the function is in src/standard.c

(cherry picked from commit 4b524124db9dc6e64b4e0f0882b5fc71d24970e0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 9027d3a6a34a9254bf4c3d642ac1fa886d5c4f23)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 94556d39f1b6d5e4f4ad8715a7b47104a0c636da)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/standard.c