BUG/MINOR: sink: Return an allocation failure in __sink_new if strdup() fails
authorTim Duesterhus <tim@bastelstu.be>
Sun, 3 Jan 2021 18:54:11 +0000 (19:54 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Jan 2021 13:47:12 +0000 (14:47 +0100)
commita9a012d5db91bcdd261446d09fac80e85593011f
treec378e30514b045a3063198b7181d6489e2d0a34e
parentffc781b1eda8d4a66e899d3a40a37094ad4f674f
BUG/MINOR: sink: Return an allocation failure in __sink_new if strdup() fails

This patch fixes GitHub issue #1023.

The function was introduced in commit 99c453d ("MEDIUM: ring: new
section ring to declare custom ring buffers."), which first appeared
in 2.2-dev9. The fix should be backported to 2.2+.

(cherry picked from commit a7ebffef660c2c83590798e0f1acceb9001ff92c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/sink.c