Skip to content

Check for duplicate status callbacks before adding to the list #14525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jarlamsa
Copy link
Contributor

@jarlamsa jarlamsa commented Apr 9, 2021

Summary of changes

This is a backport of #14497

Duplicate status callbacks don't bring any value and can cause
memory leaks if caller calls for this function multiple times with
same status_cb. Also remove all the instances of the status_cb when
removing event listener.

Documentation

None


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[x] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/mbed-os-connectivity
@ARMmbed/mbed-os-maintainers


Duplicate status callbacks don't bring any value and can cause
memory leaks if caller calls for this function multiple times with
same status_cb. Also remove all the instances of the status_cb when
removing event listener.
@mergify mergify bot added the needs: CI label Apr 9, 2021
@teetak01
Copy link
Contributor

@artokin can we merge this?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 19, 2021

CI started to get this green and merge

@mbed-ci
Copy link

mbed-ci commented Apr 19, 2021

Test run: SUCCESS

Summary: 10 of 10 test jobs passed
Build number : 1
Build artifacts

@artokin artokin merged commit b1796de into ARMmbed:feature-wisun Apr 20, 2021
@mergify mergify bot removed the ready for merge label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants