diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-05-15 23:23:23 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-05-15 23:23:23 +0200 |
commit | 071ede1e5de784820f39c2546000c08d74b12f6d (patch) | |
tree | 4ff68f19cafbcf5acbd67691bd80c3014d1ecdff /libbb | |
parent | c15f40c3e7bfeae1b616c53a574308c2df707b3d (diff) | |
download | busybox-071ede1e5de784820f39c2546000c08d74b12f6d.tar.gz |
xmalloc_[open_]read[_close]: do not ignore xrealloc return value
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/read.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/read.c b/libbb/read.c index a0c0cc64a..b58982b32 100644 --- a/libbb/read.c +++ b/libbb/read.c @@ -229,7 +229,7 @@ void* FAST_FUNC xmalloc_read(int fd, size_t *maxsz_p) if (size > 64*1024) size = 64*1024; } - xrealloc(buf, total + 1); + buf = xrealloc(buf, total + 1); buf[total] = '\0'; if (maxsz_p) @@ -273,7 +273,7 @@ void* FAST_FUNC xmalloc_open_read_close(const char *filename, size_t *maxsz_p) free(buf); return NULL; } - xrealloc(buf, size + 1); + buf = xrealloc(buf, size + 1); buf[size] = '\0'; if (maxsz_p) |