summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vasprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/vasprintf.c')
-rw-r--r--lib/libc/stdio/vasprintf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c
index 11d90a4b187..98cdb45549f 100644
--- a/lib/libc/stdio/vasprintf.c
+++ b/lib/libc/stdio/vasprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vasprintf.c,v 1.18 2015/08/31 02:53:57 guenther Exp $ */
+/* $OpenBSD: vasprintf.c,v 1.19 2015/12/28 22:08:18 mmcc Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -48,10 +48,8 @@ vasprintf(char **str, const char *fmt, __va_list ap)
return (ret);
err:
- if (f._bf._base) {
- free(f._bf._base);
- f._bf._base = NULL;
- }
+ free(f._bf._base);
+ f._bf._base = NULL;
*str = NULL;
errno = ENOMEM;
return (-1);