Skip to content

Instantly share code, notes, and snippets.

@saevarb
Created July 9, 2015 12:20
Show Gist options
  • Select an option

  • Save saevarb/a91c7dd23f469a18dd35 to your computer and use it in GitHub Desktop.

Select an option

Save saevarb/a91c7dd23f469a18dd35 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
typedef struct {
int foo;
int bar;
int baz;
int slartibartfast;
} foobar;
int main(void) {
foobar* foobar = malloc(sizeof(foobar));
foobar->slartibartfast = 3;
free(foobar);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment