3 ms·
The goto cleanup pattern is a good one. It's important to know why certain constructs are frowned upon. That pattern is not one of them. Look at the Linux kern
by scott_s 13y ago
The goto cleanup pattern is a good one. It's important to know why certain constructs are frowned upon. That pattern is not one of them.
Look at the Linux kernel; it's used extensively. For example: http://lxr.free-electrons.com/source/kernel/fork.c?v=3.3#L427 http://lxr.free-electrons.com/source/kernel/fork.c?v=3.3#L42...