diff options
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/lib/libc/std/stdio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/user/lib/libc/std/stdio.c b/src/user/lib/libc/std/stdio.c index 196c554..12064be 100644 --- a/src/user/lib/libc/std/stdio.c +++ b/src/user/lib/libc/std/stdio.c @@ -31,8 +31,7 @@ void vfprintf(FILE f, const char *fmt, va_list ap) { va_copy(ap2, ap); int l = printf_str_len(fmt, ap2); va_end(ap2); - char* buf = (char*) malloc(l+1); + char buf[l+1]; l = vsprintf(buf, fmt, ap); if (l > 0) write(f, 0, l, buf); - free(buf); } |