golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
67 stars 19 forks source link

coap_req: fix use alloc/free issues #453

Closed mniestroj closed 7 months ago

mniestroj commented 7 months ago

Fix undefined behavior related to free() of uninitialized pointer. Just return early when allocation with golioth_coap_req_new() has failed.

Free coap_req when scheduling it for sending has failed.

github-actions[bot] commented 7 months ago

Visit the preview URL for this PR (updated for commit 2084bc0):

https://golioth-zephyr-sdk-doxygen-dev--pr453-coap-req-fixes-mxptsy7t.web.app

(expires Thu, 15 Feb 2024 12:54:11 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a389eefadf4b4b68a539327b3459dd66c142cf49