Skip to content

Add ciot_wifi_multi_delete() (stop + restore handler + free owned wifi if any + free self) and using it for cleanup in error paths and tests. #46

Description

@wjsan

ciot_wifi_multi_new() can allocate an internal Wi-Fi instance (own_wifi=true). On the init-failure path, the code frees self but does not free the internally created self->base.wifi, leaking memory. More broadly, there is no public destroy function to stop and free the owned Wi-Fi/TCP instance when own_wifi=true. Consider adding ciot_wifi_multi_delete() (stop + restore handler + free owned wifi if any + free self) and using it for cleanup in error paths and tests.

Originally posted by @Copilot in #41 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions