Regarding realloc:
y = realloc(x, ...)
if (y == null) {
free(x);
// Handle OOM situation
}
x = y; y = realloc(x, ...)
if (y == null) {
free(x);
// Handle OOM situation
}
x = y;No comments yet.