CLEANUP: peers: factor the error handling code in peer_treet_updatemsg()
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Jan 2019 10:08:06 +0000 (11:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Jan 2019 10:08:06 +0000 (11:08 +0100)
commit1e82a14c346a5c5ffc41d83bf486c73d70fe4fdb
treec904a0ed59cc8d48fbeca2a152818e60133e92ac
parent4b2fd9bf71fbccd39bea4f4b46824b18d5575f93
CLEANUP: peers: factor the error handling code in peer_treet_updatemsg()

The error handling code was extremely repetitive and error-prone due
to the numerous copy-pastes, some involving unlocks or free. Let's
factor this out. The code could be further simplified, but 12 locations
were already cleaned without taking risks.
src/peers.c