ref: 72ae3e0d761d69bc3b374cc026715ef1dc4a6a24
parent: 871bf897b05b137adffa3b753ea490ee03ca7bf0
author: Andrew Chambers <andrewchamberss@gmail.com>
date: Wed Jan 27 17:40:16 EST 2016
fix small memory leak
--- a/lib/std/fmt.myr
+++ b/lib/std/fmt.myr
@@ -98,12 +98,14 @@
}
const fputv = {fd, fmt, ap
- var sb, s
+ var sb, s, n
sb = mksb()
sbfmtv(sb, fmt, ap)
s = sbfin(sb)
- -> writeall(fd, s)
+ n = writeall(fd, s)
+ slfree(s)
+ -> n
}
const fmt = {fmt, args