Checked the `realloc` spec to be sure about that and did that. I also deleted `newprev` varaible: `prev = xrealloc(prev, prevsize); `.