Last active
September 15, 2019 07:55
-
-
Save swilly22/c1f6fffc1b6e99acb6469ed4b0ce19e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void f(void) { | |
void *a = NULL; | |
void *b = NULL; | |
void *c = NULL; | |
a = malloc(32); | |
//... | |
if(cond1) { | |
free(a) | |
return; | |
} | |
b = malloc(64); | |
//... | |
if(cond2) { | |
free(a); | |
free(b); | |
return; | |
} | |
c = malloc(128); | |
//... | |
free(a); | |
free(b); | |
free(c); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment