Juan's proposed version will cause a memory leak / valgrind warning.
Not at all. I'm proposing stack pointers, not HeapAlloc'ed versions. See for example how I fixed this for the SIP tests: http://www.winehq.org/pipermail/wine-cvs/2008-July/045766.html --Juan