summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-17 04:33:47 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2009-11-17 04:33:47 (GMT)
commit995f15452a265190c222442758a21fed2233ba14 (patch)
treec2d02a2e095c092d45a0bc3560e777bc5cce9f7d
parentf3e2818895a6f570a365001f625946a1b75c085a (diff)
downloadbusybox-995f15452a265190c222442758a21fed2233ba14.tar.gz
busybox-995f15452a265190c222442758a21fed2233ba14.tar.bz2
libbb: fix vasprintf implementation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/platform.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/platform.c b/libbb/platform.c
index fdd3882..17ad3f7 100644
--- a/libbb/platform.c
+++ b/libbb/platform.c
@@ -30,7 +30,8 @@ int FAST_FUNC vasprintf(char **string_ptr, const char *format, va_list p)
if (r < 128) {
va_end(p2);
- return xstrdup(buf);
+ *string_ptr = xstrdup(buf);
+ return r;
}
*string_ptr = xmalloc(r+1);