Fix two memleaks, thanks clang for noticing