Good to see they are still using GOTO. Straight-forward and performant.
The author uses it in a clear pattern, specifically, as a sibiling post mentions, in order to achieve error handling (additionally, with fall-through); the labels are indeed neatly placed at the end of the function, after the `ret` exit.
The problem is consistency - the upper half of that function performs error handling without goto, and the lower half with it.
I personally prefer all-or-none solutions, since I highly value consistency, but on the other hand, I do consider this solution acceptable, since it still has a tidy (enough) structure.
Everything else turns into an ugly, unreadable mess in functions that need to free resources or do some kind of cleanup.