This pull requests fixes a memory leak in the library when using coaps (DTLS).
The memory allocated by SSL sessions internally stored, is only released in case of an error.
This pull requests changes this behavior to release all sessions for a certain context (an nyoci instance) when calling nyoci_release. This fixes issue #23.
In addition, a memory initialization issue is fixed, resolving further valgrind complaints.
This pull requests fixes a memory leak in the library when using coaps (DTLS). The memory allocated by SSL sessions internally stored, is only released in case of an error. This pull requests changes this behavior to release all sessions for a certain context (an nyoci instance) when calling
nyoci_release
. This fixes issue #23.In addition, a memory initialization issue is fixed, resolving further valgrind complaints.