Skip to content

Conversation

@jf-0
Copy link

@jf-0 jf-0 commented Jun 28, 2023

If some memory allocation in the member function addServiceRecord fails it will call 'goto errorReturn;'.
At errorReturn there is a call to my_free which ALWAYS frees 'record->servName' at the moment.

This PR sets servName to 0, which will later prevent the call to free (if it is called too early)

Live-Screenshot of the bug:
image
assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas"

assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas"
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants