summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/open_memstream.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c
index 71c437c78..a9327608a 100644
--- a/libc/stdio/open_memstream.c
+++ b/libc/stdio/open_memstream.c
@@ -160,9 +160,7 @@ FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc)
}
}
- if (cookie->buf != NULL) {
- free(cookie->buf);
- }
+ free(cookie->buf);
EXIT_cookie:
free(cookie);