]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
read_file(): Use x_realloc instead of realloc
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 27 Aug 2010 06:30:14 +0000 (08:30 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 27 Aug 2010 06:30:14 +0000 (08:30 +0200)
util.c

diff --git a/util.c b/util.c
index 23687943f1fe9a6644affd7858d491bff273dd2e..319aa191fb3f88d420f8fec46b48d8968fa89261 100644 (file)
--- 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);