parse_object_buffer: correct freeing the buffer