Skip to content

Instantly share code, notes, and snippets.

@gcmurphy
Last active December 11, 2015 01:28
Show Gist options
  • Save gcmurphy/4523244 to your computer and use it in GitHub Desktop.
Save gcmurphy/4523244 to your computer and use it in GitHub Desktop.
goto example for blog post
void example()
{
A *a;
B *b = NULL;
a = a_new();
if (! a){
goto end;
}
b = b_new(a);
if (! b){
goto end;
}
use_b(b);
end:
b_delete(b);
a_delete(a);
puts("bye");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment