darconeous / libnyoci

A flexible CoAP stack for embedded devices and computers. RFC7252 compatible.
Other
27 stars 10 forks source link

Bugfix/dtls memleak #24

Open vwout opened 4 years ago

vwout commented 4 years ago

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.