aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/platform.c b/libbb/platform.c
index d241d25a7..19734517b 100644
--- a/libbb/platform.c
+++ b/libbb/platform.c
@@ -33,7 +33,7 @@ int FAST_FUNC vasprintf(char **string_ptr, const char *format, va_list p)
33 if (r < 128) { 33 if (r < 128) {
34 va_end(p2); 34 va_end(p2);
35 *string_ptr = strdup(buf); 35 *string_ptr = strdup(buf);
36 return r; 36 return (*string_ptr ? r : -1);
37 } 37 }
38 38
39 *string_ptr = malloc(r+1); 39 *string_ptr = malloc(r+1);