committing scott's safer MALLOC macro and a new buffer_release function patches