BUG/MINOR: cfgparse-listen: fix ebpt_next_dup pointer dereference on proxy "from" inheritance

ebpt_next_dup() was used 2 times in a row but only the first call was
checked against NULL, probably assuming that the 2 calls always yield the
same result here.

gcc is not OK with that, and it should be safer to store the result of
the first call in a temporary var to dereference it once checked against NULL.

This should fix GH #1869.
Thanks to Ilya for reporting this issue.

It may be backported up to 2.4.

(cherry picked from commit 9dce88ba2cb73b6c3665b4eeaa74186ebce2c7a5)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c33990458ca2e5f22c5c68a84a7fe3c861bf958c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0efed70ad18dfce985e979ab502d384668b55924)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed