This is C. There's nothing questionable about this "style." It is just how C is written. How else are you going to free resources without a code section to do it? Copy/paste it dozens of times?
The specific code isn't "goto fail" anyway, it is more akin to a finally block.