Well I'm not sure if this is a memory leak or not. I'm pretty certain it is, but need the view of a more experienced programmer :).
At first glance (to me at least) it looks like a memory leak because the buffer can apparently not be free'd.Code:
// for example
char* buffer = malloc(20 * sizeof(char));
return buffer; // memory leak?
How would I get around this without the use of gloabal variables?