mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
clear mdns.queryservice()'s previous result when called (#4894)
cleared the linkedlist. * issue #4893
This commit is contained in:
committed by
Develo
parent
12d52220ae
commit
e0b6242e04
@ -289,7 +289,13 @@ int MDNSResponder::queryService(char *service, char *proto) {
|
||||
#ifdef DEBUG_ESP_MDNS_TX
|
||||
DEBUG_ESP_PORT.printf("queryService %s %s\n", service, proto);
|
||||
#endif
|
||||
|
||||
while(_answers!=0){
|
||||
MDNSAnswer *currAnswer = _answers;
|
||||
_answers = _answers->next;
|
||||
os_free(currAnswer->hostname);
|
||||
os_free(currAnswer);
|
||||
currAnswer = 0;
|
||||
}
|
||||
if (_query != 0) {
|
||||
os_free(_query);
|
||||
_query = 0;
|
||||
|
Reference in New Issue
Block a user