diff options
Diffstat (limited to 'lib/libc/stdio/vsnprintf.c')
-rw-r--r-- | lib/libc/stdio/vsnprintf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c index b301b08..3b76259 100644 --- a/lib/libc/stdio/vsnprintf.c +++ b/lib/libc/stdio/vsnprintf.c @@ -69,5 +69,7 @@ vsnprintf(str, n, fmt, ap) ret = __vfprintf(&f, fmt, ap); if (on > 0) *f._p = '\0'; + if (str == NULL) + free(f._bf._base); return (ret); } |