va_start should be paired with va_end
don't leak memory
Merge pull request #25 from monsta/fixes

Fix some leaks and other stuff