Fix memory leak

Buffer was allocated, but never released.
Revert "Fix memory leak"

This reverts commit 4d2e7f172daf44822bab2a72d6e86770df9ee5a0.
Fix memory leak

Buffer was allocated, but never released.