Prevent buffer from being freed prematurely or twice.