diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-04-10 14:29:06 -0400 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2013-04-21 14:23:02 -0500 |
commit | f8cb5dd94903a5cfa1609695328b8f1d5557367f (patch) | |
tree | c2d40fb52211679a0dedc3132a702b951abd8d51 /util.c | |
parent | 27cdc1b16f86f970c3c049795d4e71ad531cca3d (diff) | |
download | dtc-f8cb5dd94903a5cfa1609695328b8f1d5557367f.zip dtc-f8cb5dd94903a5cfa1609695328b8f1d5557367f.tar.gz dtc-f8cb5dd94903a5cfa1609695328b8f1d5557367f.tar.bz2 |
utilfdt_read_err: use xmalloc funcs
We've got these handy helpers, so let's use them.
Acked-by: David Gibson <David@gibson.dropbear.id.au>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -212,12 +212,12 @@ int utilfdt_read_err(const char *filename, char **buffp) } /* Loop until we have read everything */ - buf = malloc(bufsize); + buf = xmalloc(bufsize); do { /* Expand the buffer to hold the next chunk */ if (offset == bufsize) { bufsize *= 2; - buf = realloc(buf, bufsize); + buf = xrealloc(buf, bufsize); if (!buf) { ret = ENOMEM; break; |