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 .

Code:
// for example 
char* get_buffer()
{
	char* buffer = malloc(20 * sizeof(char));
	// etc
	return buffer;	// memory leak?
}
At first glance (to me at least) it looks like a memory leak because the buffer can apparently not be free'd.

How would I get around this without the use of gloabal variables?