summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/open_memstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c
index 17ef191cb..71a84138d 100644
--- a/libc/stdio/open_memstream.c
+++ b/libc/stdio/open_memstream.c
@@ -156,9 +156,10 @@ FILE *open_memstream(char **bufloc, size_t *sizeloc)
__STDIO_STREAM_VALIDATE(fp);
return fp;
}
+
+ free(cookie->buf);
}
- free(cookie->buf);
EXIT_cookie:
free(cookie);