Skip to content
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

event_create(): check malloc() return value to be non-NULL #1084

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

laroche
Copy link
Contributor

@laroche laroche commented Jun 6, 2024

Description

Check malloc() return value to be non-NULL before writing data to the allocated memory in the function event_create.

Test Steps

NA.

Checklist:

  • [NA] I have tested my changes. No regression in existing tests.
  • [ NA] I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

NA.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Check malloc() to return non-NULL before writing data
in the function event_create().

Signed-off-by: Florian La Roche <[email protected]>
@laroche laroche requested a review from a team as a code owner June 6, 2024 19:39
shubnil
shubnil previously approved these changes Jun 7, 2024
@aggarg aggarg changed the title event_create(): check malloc() to be non-NULL event_create(): check malloc() return value to be non-NULL Jun 7, 2024
Copy link

sonarqubecloud bot commented Jun 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@shubnil shubnil merged commit c431b35 into FreeRTOS:main Jun 7, 2024
16 checks passed
AhmedIsmail02 pushed a commit to AhmedIsmail02/FreeRTOS-Kernel that referenced this pull request Jun 12, 2024
…1084)

* event_create(): check malloc() to be non-NULL

Check malloc() to return non-NULL before writing data
in the function event_create().

Signed-off-by: Florian La Roche <[email protected]>

* Code review suggestion

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Florian La Roche <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
@laroche laroche deleted the lr30 branch September 22, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants