commit 5ab054a9d535b80a47b6b5707918af33f58204db
parent ef00cd1a511c6c3836ab2e9141c37babbca0aec2
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 2 Dec 2020 10:29:17 +0100
Fix the rng_proxy_release internal function
It failed if invoked on a proxy with a null RNG, i.e. a partially
initialised proxy.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ssp_rng_proxy.c b/src/ssp_rng_proxy.c
@@ -530,7 +530,7 @@ rng_proxy_release(ref_T* ref)
sa_release(proxy->states);
sa_release(proxy->pools);
sa_release(proxy->buckets);
- SSP(rng_ref_put(proxy->rng));
+ if(proxy->rng) SSP(rng_ref_put(proxy->rng));
if(proxy->mutex) mutex_destroy(proxy->mutex);
MEM_RM(proxy->allocator, proxy);
}