Some bug was found: realloc may return NULL, if size is 0. This should not be considered as if realloc has failed.