Do not free the slot when cred buf is NULL. If the TLS credential storage backend does not have a buffer pointer to the TLS credential, then the buffer pointer can be NULL. This may happen with an out-of-tree TLS credential storage backend. In this case where credential buffer is NULL find_ref_slot retrieves a new slot, and then tries to free it, causing a crash. Signed-off-by: Joakim Andersson <joerchan@gmail.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Kconfig.shell | ||
| tls_credentials_digest_raw.c | ||
| tls_credentials_digest_raw.h | ||
| tls_credentials_shell.c | ||
| tls_credentials_trusted.c | ||
| tls_credentials.c | ||
| tls_internal.h | ||