As reported by Ilya in GH #2994, some cleanup parts in
sink_new_from_logger() function are not used.
We can actually simplify the cleanup logic to remove dead code, let's
do that by renaming "error_final" label to "error" and only making use
of the "error" label, because sink_free() already takes care of proper
cleanup for all sink members.
HA_SPIN_INIT(&srv->lock);
if (sink_finalize(sink) & ERR_CODE)
- goto error_final;
+ goto error;
return sink;
- error:
- if (srv)
- srv_detach(srv);
- srv_drop(srv);
- error_final:
+ error:
sink_free(sink);
return NULL;