This is a memory leak.  The IBuildSitBrain is only called in one place, and the value returned via pAnimName is never freed.  The old code was correct in this case.