1 2 #include <stdlib.h> 3 ddd(char * x)4void ddd ( char* x ) 5 { 6 free(x); 7 free(x); 8 } 9 ccc(char * x)10void ccc (char* x) 11 { 12 ddd(x); 13 } 14 bbb(char * x)15void bbb (char* x) 16 { 17 ccc(x); 18 } 19 aaa(char * x)20void aaa (char* x) 21 { 22 bbb(x); 23 } 24 ok_to_suppress_double_free_from_this_fun(char * y)25void ok_to_suppress_double_free_from_this_fun(char* y) 26 { 27 aaa(y); 28 } 29 main(int argc,char * argv[])30int main ( int argc, char*argv[] ) 31 { 32 char* x = malloc(10); 33 char* y = malloc(10); 34 if (argc > 1) 35 ok_to_suppress_double_free_from_this_fun(y); 36 aaa(x); 37 return 0; 38 } 39