I'm proposing the following patch, though I'm not sure whether or not we should free_container in the event of destroy_resource returning an error(?)
I think that your patch has the correct behavior. If you look at the reslist_cleanup function it will also not free the container if the destroy_resource returns an error.
This is a very useful addition to resource lists, allowing things like client sockets once invalid to be easily removed from the pool. It is functionality that is needed as reslists usage increase. Can someone please commit this patch?
-chip
