Re: [PATCH 4/5] reg: Use a helper function to allocate and re-allocate memory