It does. In fact, it's the Tsrv case that looks wrong (it leaks space already allocated by rralloc). nrp = rralloc(rp->type); ... case Tsoa: soa = nrp->soa; --- save space allocated by rralloc *nrp = *rp; --- destroy pointer by copying onto it nrp->soa = soa; --- restore pointer *nrp->soa = *rp->soa; ---- copy substructure. ... On 26 August 2012 09:16, wrote: > when you look at rralloc(), you can see that these sub structures are > indeed malloced so rrcopy needs to copy these too (like it does for the > Tsrv case). >