Also freed the stream pointer memory