From 30d2f75dbb2b04e86e10df8f4361bbf3400f5247 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 20 Feb 2001 15:56:12 +0000 Subject: [PATCH] update. --- lib/silcclient/client.c | 5 ++++- lib/silcmath/mpbin.c | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index bc7d8dfe..9b34079a 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -54,6 +54,9 @@ SilcClient silc_client_alloc(SilcClientOperations *ops, void *application) void silc_client_free(SilcClient client) { if (client) { + if (client->rng) + silc_rng_free(client->rng); + silc_free(client); } } @@ -76,7 +79,7 @@ int silc_client_init(SilcClient client) /* Initialize random number generator */ client->rng = silc_rng_alloc(); silc_rng_init(client->rng); - silc_math_primegen_init(); /* XXX */ + silc_rng_global_init(client->rng); /* Register protocols */ silc_client_protocols_register(); diff --git a/lib/silcmath/mpbin.c b/lib/silcmath/mpbin.c index 8b598aa1..555dbebf 100644 --- a/lib/silcmath/mpbin.c +++ b/lib/silcmath/mpbin.c @@ -52,8 +52,7 @@ unsigned char *silc_mp_mp2bin(SilcInt *val, unsigned int len, } /* Samve as above but does not allocate any memory. The encoded data is - returned into `dst' and it's length to the `ret_len'. If `dst_len is - non-zero then the destination buffer is assumbed to be that large. */ + returned into `dst' and it's length to the `ret_len'. */ void silc_mp_mp2bin_noalloc(SilcInt *val, unsigned char *dst, unsigned int dst_len) -- 2.24.0