[Crosstoolchain-logs] [device-tree-compiler] 80/198: utilfdt_read_err: use xmalloc funcs

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit f8cb5dd94903a5cfa1609695328b8f1d5557367f
Author: Mike Frysinger <vapier at gentoo.org>
Date:   Wed Apr 10 14:29:06 2013 -0400

    utilfdt_read_err: use xmalloc funcs
    
    We've got these handy helpers, so let's use them.
    
    Acked-by: David Gibson <David at gibson.dropbear.id.au>
    Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util.c b/util.c
index b081fa8..12f0614 100644
--- a/util.c
+++ b/util.c
@@ -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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list