ArduinoMDNS
ArduinoMDNS copied to clipboard
Fix invalid call to free() in 'addServiceRecord'
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:
assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas"