diff options
Diffstat (limited to 'lib/libc/stdio/vsprintf.c')
-rw-r--r-- | lib/libc/stdio/vsprintf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index dbfd339..9bcd075 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -61,5 +61,7 @@ vsprintf(str, fmt, ap) f._bf._size = f._w = INT_MAX; ret = __vfprintf(&f, fmt, ap); *f._p = 0; + if (str == NULL) + free(f._bf._base); return (ret); } |