Skip to content

BLE: fix pointer not set to null on delete #12185

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
merged 1 commit into from
Jan 7, 2020

Conversation

paul-szczepanek-arm
Copy link
Member

@paul-szczepanek-arm paul-szczepanek-arm commented Jan 3, 2020

Summary of changes

Fix missing setting of pointer to NULL on delete.

Impact of changes

Migration actions required

Documentation

Based on @AGlass0fMilk PR #12145, superseding it.


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)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@0xc0170 0xc0170 requested a review from AGlass0fMilk January 3, 2020 09:40
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 3, 2020

@AGlass0fMilk Should we close #12145 ? Please review

@ciarmcom ciarmcom requested review from a team January 3, 2020 10:00
@ciarmcom
Copy link
Member

ciarmcom commented Jan 3, 2020

@paul-szczepanek-arm, thank you for your changes.
@ARMmbed/mbed-os-pan @ARMmbed/mbed-os-maintainers please review.

Copy link
Member

@AGlass0fMilk AGlass0fMilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170 @paul-szczepanek-arm

Were there still tabs in my original PR? 🤣

This seems to be missing the removal of the "double delete" that could occur upon SM reset:

https://github.com/ARMmbed/mbed-os/pull/12145/files#diff-080d4438cb8d004ac2bd9fca2be4f45bL833-L840

Now it'll just be trying to delete a NULL pointer.

@paul-szczepanek-arm
Copy link
Member Author

checking a pointer for NULL is redundant in application code, the check is already performed inside delete

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 7, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 7, 2020

Test run: SUCCESS

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

@0xc0170 0xc0170 added needs: review release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 and removed needs: CI labels Jan 7, 2020
@0xc0170 0xc0170 requested a review from AGlass0fMilk January 7, 2020 12:06
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 7, 2020

checking a pointer for NULL is redundant in application code, the check is already performed inside delete

@AGlass0fMilk This is ready for integration. All good here?

@AGlass0fMilk
Copy link
Member

If that’s the case it should be all set.

@0xc0170 0xc0170 merged commit d07d7ca into ARMmbed:master Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants