Function create_objects_from_handles allocates an array of pointers
whose address is kept in the variable "objects". Then after that array
is allocated, it tries to fill in the array with values of other allocated
objects. If any of the allocation attempts fails, it frees all the previously
allocated objects, but does not free the array of object pointers. It leaks
the array named "objects".
Created attachment 301437 [details] [diff] [review]
Comment on attachment 301437 [details] [diff] [review]
I guess this is the right free routine for "objects". Not sure.
Thanks for the review. It is the right routine. You can find examples in the same source file of other objectHandles arrays allocated with nss_ZNEWARRAY and freed with nss_ZFreeIf.
I checked this in to the trunk.
Checking in devtoken.c;
/cvsroot/mozilla/security/nss/lib/dev/devtoken.c,v <-- devtoken.c
new revision: 1.43; previous revision: 1.42