va_start should be paired with va_end
don't leak memory
Merge pull request #32 from monsta/no-leaks

Fix some leaks and other stuff