From 7be123d24c0dcd358c499dfb8dd365a9f10cac88 Mon Sep 17 00:00:00 2001 From: Valentin Gosu Date: Mon, 11 Mar 2019 13:00:35 +0000 Subject: [PATCH] Bug 1420677 - Make AddrInfo.mAddresses an AutoCleanLinkedList r=dragana Differential Revision: https://phabricator.services.mozilla.com/D22960 --HG-- extra : moz-landing-system : lando --- netwerk/dns/DNS.cpp | 4 ---- netwerk/dns/DNS.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/netwerk/dns/DNS.cpp b/netwerk/dns/DNS.cpp index 3154c8901144..3186e294228b 100644 --- a/netwerk/dns/DNS.cpp +++ b/netwerk/dns/DNS.cpp @@ -330,10 +330,6 @@ AddrInfo::AddrInfo(const AddrInfo *src) { } AddrInfo::~AddrInfo() { - NetAddrElement *addrElement; - while ((addrElement = mAddresses.popLast())) { - delete addrElement; - } } void AddrInfo::AddAddress(NetAddrElement *address) { diff --git a/netwerk/dns/DNS.h b/netwerk/dns/DNS.h index e5c4e214a2e5..061e99376605 100644 --- a/netwerk/dns/DNS.h +++ b/netwerk/dns/DNS.h @@ -149,7 +149,7 @@ class AddrInfo { uint32_t ttl; static const uint32_t NO_TTL_DATA = (uint32_t)-1; - LinkedList mAddresses; + AutoCleanLinkedList mAddresses; unsigned int IsTRR() { return mFromTRR; } private: