Test failure due to memory leaks in shared-random unit tests: long-term fix
In #29599 (moved) we fixed some leaks in the shared-random unit tests. But there are still some test failures.
The shared random state claims to take over ownership of SRVs passed to it using PUT. But it doesn't free them automatically: instead, the caller has to remember to call state_del_current_srv() first. (Or one of its callers.)
The current app code is ok, but the test code doesn't always call the functions in the right order.