fix memory leak
cabac optimization in residual coding