Fixed free of null pointer.