From: Andre Noll Date: Sun, 13 May 2018 15:27:07 +0000 (+0200) Subject: epi_iter_new(): Use xrealloc(). X-Git-Tag: v1.0.1~18 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=7acb033860d1e186999e799617be76d32aeb45e8;p=tfortune.git epi_iter_new(): Use xrealloc(). This way we get proper error checking. --- diff --git a/tfortune.c b/tfortune.c index 7e59eb6..0768976 100644 --- a/tfortune.c +++ b/tfortune.c @@ -335,7 +335,7 @@ static struct epi_iter *epi_iter_new(void) regfile_iter_next(riter) ) { eiter->num_maps++; - eiter->maps = realloc(eiter->maps, + eiter->maps = xrealloc(eiter->maps, eiter->num_maps * sizeof(*eiter->maps)); eiter->maps[eiter->num_maps - 1] = iov; }