From 7acb033860d1e186999e799617be76d32aeb45e8 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 13 May 2018 17:27:07 +0200 Subject: [PATCH] epi_iter_new(): Use xrealloc(). This way we get proper error checking. --- tfortune.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5