Hi,

 

I am using x509_dup to create a duplicate certificate. Once I am done with my
work, I use X509_free to free the duplicate certificate. But when I run my code
with valgrind, it reports of some leaks. The following is the valgrind stack
trace,

 

==3845== 408 (72 direct, 336 indirect) bytes in 6 blocks are definitely lost in
loss record 248 of 280

==3845==    at 0x4023F8D: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)

==3845==    by 0x415738C: default_malloc_ex (mem.c:79)

==3845==    by 0x4157965: CRYPTO_malloc (mem.c:306)

==3845==    by 0x41EF063: asn1_item_ex_combine_new (tasn_new.c:191)

==3845==    by 0x41EEDE8: ASN1_item_ex_new (tasn_new.c:85)

==3845==    by 0x41F1157: ASN1_item_ex_d2i (tasn_dec.c:400)

==3845==    by 0x41F1934: asn1_template_noexp_d2i (tasn_dec.c:706)

==3845==    by 0x41F1613: asn1_template_ex_d2i (tasn_dec.c:575)

==3845==    by 0x41F1298: ASN1_item_ex_d2i (tasn_dec.c:448)

==3845==    by 0x41F1A82: asn1_template_noexp_d2i (tasn_dec.c:746)

==3845==    by 0x41F16E2: asn1_template_ex_d2i (tasn_dec.c:607)

==3845==    by 0x41F1298: ASN1_item_ex_d2i (tasn_dec.c:448)

==3845==    by 0x41F0AD6: ASN1_item_d2i (tasn_dec.c:136)

==3845==    by 0x41E4756: ASN1_item_dup (a_dup.c:106)

==3845==    by 0x41EA643: X509_dup (x_x509.c:142)

 

Please let me know if I need to free anything more other than the duplicate
certificate.

BTW: I am using openssl1.0.0e version

 

Regards,

Rajib

Reply via email to