As per the rules for memory in RPC, the memory pointer to by object will be used during unmarshalling and previously it was uninitialised. (Thanks to Dan Kegel and his Valgrind runs for reporting this.)