Fix the realloc such that cppcheck no longer complains about it (Also fix a goto fail issue)
Primitive types don't have nice constructors