diff options
Diffstat (limited to 'lib/libc/stdio/snprintf.c')
-rw-r--r-- | lib/libc/stdio/snprintf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c index fe21129..3463c05 100644 --- a/lib/libc/stdio/snprintf.c +++ b/lib/libc/stdio/snprintf.c @@ -87,5 +87,7 @@ snprintf(str, n, fmt, va_alist) if (on > 0) *f._p = '\0'; va_end(ap); + if (str == NULL) + free(f._bf._base); return (ret); } |