char * string; string = my_foo(); // Do stuff free(string); #### void foo_free(char * string) { free(string); }