This `memset` has disappeared after you moved the func. Is it intentional? Maybe we should be doing a memzero here.