proper init and destruction

Vassilios Zafiropoulos vasili3000 at
Tue Jan 29 12:43:39 CET 2008

hello list,

i am currently debugging a library that uses libgrypt, ver 11.2.3.

running a sample program through valgrind, i noticed that some memory allocated when using function


is never released. the samle program follows:

#include "stdio.h"
#include "stdlib.h"

#include <gcrypt.h>

int main(){

  char message[16];
  memset(message, 0, sizeof(message));
  int i =0;
    gcry_randomize(message, 16, GCRY_VERY_STRONG_RANDOM);
  return 1;

this call uses only once some 1500 bytes that are never released. Is there something I can do about it? am i missing something on proper initialization and destruction of the library internal structures?

also, in some other part of the lib i am debugging, successive calls to 


allocate up to 500 bytes that are never released. Do you have any clues on that?

thank you,


Express yourself instantly with MSN Messenger! Download today it's FREE!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20080129/d2624ea2/attachment.htm>

More information about the Gcrypt-devel mailing list