Skip to content

Commit

Permalink
issue esp8266#4893
Browse files Browse the repository at this point in the history
  • Loading branch information
a-c-sreedhar-reddy authored Jul 5, 2018
1 parent 87991ab commit ae1448c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libraries/ESP8266mDNS/ESP8266mDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,15 @@ int MDNSResponder::queryService(char *service, char *proto) {
#ifdef DEBUG_ESP_MDNS_TX
DEBUG_ESP_PORT.printf("queryService %s %s\n", service, proto);
#endif

MDNSAnswer *answer;
int numAnswers = _getNumAnswers();
for (int n = numAnswers - 1; n >= 0; n--) {
answer = _getAnswerFromIdx(n);
os_free(answer->hostname);
os_free(answer);
answer = 0;
}
_answers = 0;
if (_query != 0) {
os_free(_query);
_query = 0;
Expand Down

0 comments on commit ae1448c

Please sign in to comment.