Will this leak memory?

Um, no. You would have one buffer and pass the address of the buffer you want to use each time you call the function. If you like, it can be the same buffer.