On 03/12/14 10:34, T@Run..............! Polisetty wrote:
> Hai All,
> 
>    We are using Openssl for DTLS Negotiations. When we run the Valgrind
> with this setup. We are finding some major loss of memory at one place.
> 
>  
> ==23871== 4,224 (1,056 direct, 3,168 indirect) bytes in 3 blocks are
> definitely lost in loss record 1,332 of 1,482
> ==23871==    at 0x4C26BED: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==23871==    by 0x514C7F2: CRYPTO_malloc (in /usr/lib/libcrypto.so.1.0.0)
> ==23871==    by 0x4E711E8: SSL_SESSION_new (in /usr/lib/libssl.so.1.0.0)
> ==23871==    by 0x4E712FC: ssl_get_new_session (in /usr/lib/libssl.so.1.0.0)
> ==23871==    by 0x4E4CCFC: ssl3_get_client_hello (in
> /usr/lib/libssl.so.1.0.0)
> ==23871==    by 0x4E6444A: dtls1_accept (in /usr/lib/libssl.so.1.0.0)
> ==23871==    by 0x4E688C5: dtls1_read_bytes (in /usr/lib/libssl.so.1.0.0)
> ==23871==    by 0x4E550A9: ssl3_read (in /usr/lib/libssl.so.1.0.0)
> ==23871==    by 0xB0CD1E: dtlsSrtpOpenSSLRead(dtls_srtp_ccb_str*,
> ssl_st*, unsigned int, sockaddr_str*, sockaddr_str*, bool)
> (dtlsSrtpOpenssl.c:776)
> ==23871==    by 0xB14FD8:
> dtlsSrtpProcessRecvPkt(dtls_srtp_pkt_rcv_ind_msg_str*)
> (dtlsSrtpMsgProc.c:945)
> ==23871==    by 0xB12C41: dtlsSrtpActiveMsgProc(icm_msg_str*)
> (dtlsSrtpMsgProc.c:284)
> ==23871==    by 0xB12A82: dtlsSrtpActiveMsgProc(icm_msg_str*,
> IcmMsgBase*) (dtlsSrtpMsgProc.c:231)
> 
> Can anyone throw some light on it ?

It looks like session objects are being leaked. There is a session cache
maintained within the SSL_CTX. So are you correctly freeing your SSL_CTX?

Matt



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to