Fix possible leaks in stdext::format