valgrind --leak-check=yes shows the below message, trying to figure out what i need to do to correct this. i do have BIO_free(verify_bio); before the function returns

==29460== 280 bytes in 10 blocks are still reachable in loss record 1 of 1
==29460==    at 0x40053C0: malloc (vg_replace_malloc.c:149)
==29460==    by 0x4056C7D: (within /lib/libcrypto.so.0.9.8b)
==29460==    by 0x40572FE: CRYPTO_malloc (in /lib/libcrypto.so.0.9.8b)
==29460==    by 0x40AA5C7: lh_new (in /lib/libcrypto.so.0.9.8b)
==29460==    by 0x4058DA9: (within /lib/libcrypto.so.0.9.8b)
==29460==    by 0x4058F06: (within /lib/libcrypto.so.0.9.8b)
==29460==    by 0x405930B: (within /lib/libcrypto.so.0.9.8b)
==29460==    by 0x4058B88: CRYPTO_new_ex_data (in /lib/libcrypto.so.0.9.8b)
==29460==    by 0x40A15F3: BIO_set (in /lib/libcrypto.so.0.9.8b)
==29460==    by 0x40A1689: BIO_new (in /lib/libcrypto.so.0.9.8b)
==29460==    by 0x40A1C75: BIO_new_mem_buf (in /lib/libcrypto.so.0.9.8b)
==29460==    by 0x4015C50: myprog_func (libmyprog.c:2410)

libmyprog.c:2410 is verify_bio = BIO_new_mem_buf(vlpk, -1);



 verify_bio = BIO_new_mem_buf(vlpk, -1);
  if(verify_bio == NULL) {
          return 0;
  }
  verify_evp = PEM_read_bio_PUBKEY(verify_bio, NULL, NULL, NULL);
  if(verify_evp == NULL) {
     return 0;
  }
  free(vlpk);
  slen = EVP_PKEY_size(verify_evp);
  EVP_MD_CTX_init(&md_ctx);
  EVP_VerifyInit(&md_ctx, EVP_sha1());
  EVP_VerifyUpdate(&md_ctx, ebuf, strlen(ebuf));
  verified = EVP_VerifyFinal(&md_ctx, verify_sig, slen, verify_evp);
  EVP_MD_CTX_cleanup(&md_ctx);
  EVP_PKEY_free(verify_evp);
  BIO_free(verify_bio);
  free(verify_sig);
  if(verified) {
     return 1;
  }

  return 0;


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to