From: Joel Rosdahl Date: Fri, 27 Aug 2010 06:30:14 +0000 (+0200) Subject: read_file(): Use x_realloc instead of realloc X-Git-Tag: v3.1~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=858dfed248a0107ed346dac0b93477d49c8cc6f4;p=thirdparty%2Fccache.git read_file(): Use x_realloc instead of realloc --- diff --git a/util.c b/util.c index 23687943f..319aa191f 100644 --- a/util.c +++ b/util.c @@ -1104,7 +1104,7 @@ read_file(const char *path, size_t size_hint, char **data, size_t *size) pos += ret; if (pos > allocated / 2) { allocated *= 2; - *data = realloc(*data, allocated); + *data = x_realloc(*data, allocated); } } while ((ret = read(fd, *data + pos, allocated - pos)) > 0); close(fd);