remove useless buf close function