Topic: [SOLVED] Some questions about wolfSSL_free()
I implement a application with wolfSSL. I have two questions.
Q1:
When I call wolfSSL_free, my application crash.
backtrace:
#0 0x01026384 in _list_release () from C:\QNX650\target\qnx6/armle-v7/lib/libc.so.3
#1 0x01027fd4 in __free () from C:\QNX650\target\qnx6/armle-v7/lib/libc.so.3
#2 0x001f3050 in FreeCiphers (ssl=0x275138) at src/internal.c:1645
#3 0x001fce80 in SSL_ResourceFree (ssl=0x699ab664) at src/internal.c:3564
#4 0x001fd1dc in FreeSSL (ssl=0x275138, heap=0x11b8) at src/internal.c:3890
#5 0x001d2410 in wolfSSL_free (ssl=0x275138) at src/ssl.c:384
Why crash occured here?
I new a ctx by calling wolfSSL_CTX_new, then I new two ssl object ssl1 and ssl2 based on the same ctx.
If I free ssl1 by calling wolfSSL_free(ssl1), is the ctx is also freed? Does it influence ssl2?
Q2:
A crash is occured when wolfSSL_write is called.
backtrace:
#0 SendBuffered (ssl=0x2724d8) at src/internal.c:4855
4855 src/internal.c: No such file or directory.
in src/internal.c
(gdb) bt
#0 SendBuffered (ssl=0x2724d8) at src/internal.c:4855
#1 0x001f5870 in SendData (ssl=0x2724d8, data=0x26f1d8, sz=125) at src/internal.c:10780
#2 0x001d1f90 in wolfSSL_write (ssl=0x2724d8, data=0x26f1d8, sz=125) at src/ssl.c:1033