Commit 8457db5
net: tls_credentials: Do not free slot when cred buf is NULL
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 <[email protected]>1 parent 3cc9282 commit 8457db5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| |||
0 commit comments