Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Memory leak on multiple calls to loadCACert and others on WiFiClientSecure #5826

Copy link
Copy link
Closed
@sguarin

Description

@sguarin
Issue body actions

If you have a system that can accept certs configuration, then multiple calls to loadCACert or related functions will not reutilize the memory assigned.

https://github.com/sguarin/arduino-esp32/blob/caa8d07aafa04441bb85e6046a795249c01d9e39/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp#L304

_streamLoad()
allocates memory for new certificates. A better approach should be using realloc().

https://github.com/sguarin/arduino-esp32/blob/caa8d07aafa04441bb85e6046a795249c01d9e39/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp#L290

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.