Commit 8c9a5e0c authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2107] fixed a use-after-free bug in rdataSetDeleter.

parent 5e463e91
...@@ -42,9 +42,12 @@ void ...@@ -42,9 +42,12 @@ void
rdataSetDeleter(RRClass rrclass, util::MemorySegment* mem_sgmt, rdataSetDeleter(RRClass rrclass, util::MemorySegment* mem_sgmt,
RdataSet* rdataset_head) RdataSet* rdataset_head)
{ {
RdataSet* rdataset_next;
for (RdataSet* rdataset = rdataset_head; for (RdataSet* rdataset = rdataset_head;
rdataset != NULL; rdataset != NULL;
rdataset = rdataset->getNext()) { rdataset = rdataset_next)
{
rdataset_next = rdataset->getNext();
RdataSet::destroy(*mem_sgmt, rrclass, rdataset); RdataSet::destroy(*mem_sgmt, rrclass, rdataset);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment