I have an RPC server that transfers a large amount of variable length data to the client. The .x file looks something like this
struct file
{
opaque data<>
};
In the server routine, I have
struct file *transfer_1_svc(...)
{
struct file;
file.data.data_val = malloc(...);
return &file;
}
My question is who frees the data allocated in the server routine?