Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
44beee2f
Unverified
Commit
44beee2f
authored
May 09, 2022
by
Rodrigo Garcia
Committed by
GitHub
May 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes DNS Server Memory Leak when deleted (#6707)
parent
0b3f1a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
libraries/DNSServer/src/DNSServer.cpp
libraries/DNSServer/src/DNSServer.cpp
+16
-0
libraries/DNSServer/src/DNSServer.h
libraries/DNSServer/src/DNSServer.h
+1
-0
No files found.
libraries/DNSServer/src/DNSServer.cpp
View file @
44beee2f
...
...
@@ -20,6 +20,22 @@ DNSServer::DNSServer()
_port
=
0
;
}
DNSServer
::~
DNSServer
()
{
if
(
_dnsHeader
)
{
free
(
_dnsHeader
);
_dnsHeader
=
NULL
;
}
if
(
_dnsQuestion
)
{
free
(
_dnsQuestion
);
_dnsQuestion
=
NULL
;
}
if
(
_buffer
)
{
free
(
_buffer
);
_buffer
=
NULL
;
}
}
bool
DNSServer
::
start
(
const
uint16_t
&
port
,
const
String
&
domainName
,
const
IPAddress
&
resolvedIP
)
{
...
...
libraries/DNSServer/src/DNSServer.h
View file @
44beee2f
...
...
@@ -76,6 +76,7 @@ class DNSServer
{
public:
DNSServer
();
~
DNSServer
();
void
processNextRequest
();
void
setErrorReplyCode
(
const
DNSReplyCode
&
replyCode
);
void
setTTL
(
const
uint32_t
&
ttl
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment