[OpenAFS-devel] Proposal for capabilities support in Unix client 1.4.x

Felix Frank Felix.Frank@Desy.de
Wed, 17 Jun 2009 17:28:30 +0200


>>   xdr_free(caps, j * sizeof(Capabilities));
> 
> This is a bad example; in the patch in question, caps is the array of 
> Capabilities structures allocated for rx_multi.  It was allocated using 
> afs_osi_Alloc(), not by XDR, and so should be freed using 
> afs_osi_Free(), as Frank's patch does.

What's more - the "tricky" part is actually freeing the individual 
Capability_vals as those are what's spit out by the stub. Those must be 
freed individually, with xdr_free() as was suggested, but not using the 
above snippet, that's true.

Cheers
  - Felix