Fixing buffer leaks in FramesTest