We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b3f1a9 commit 44beee2Copy full SHA for 44beee2
libraries/DNSServer/src/DNSServer.cpp
@@ -20,6 +20,22 @@ DNSServer::DNSServer()
20
_port = 0;
21
}
22
23
+DNSServer::~DNSServer()
24
+{
25
+ if (_dnsHeader) {
26
+ free(_dnsHeader);
27
+ _dnsHeader = NULL;
28
+ }
29
+ if (_dnsQuestion) {
30
+ free(_dnsQuestion);
31
+ _dnsQuestion = NULL;
32
33
+ if (_buffer) {
34
+ free(_buffer);
35
+ _buffer = NULL;
36
37
+}
38
+
39
bool DNSServer::start(const uint16_t &port, const String &domainName,
40
const IPAddress &resolvedIP)
41
{
libraries/DNSServer/src/DNSServer.h
@@ -76,6 +76,7 @@ class DNSServer
76
77
public:
78
DNSServer();
79
+ ~DNSServer();
80
void processNextRequest();
81
void setErrorReplyCode(const DNSReplyCode &replyCode);
82
void setTTL(const uint32_t &ttl);
0 commit comments