[ASAN] UPNP url memory leak (#2397)

This commit is contained in:
Wesley Shillingford 2019-11-11 14:46:48 +00:00 committed by GitHub
commit 3a2caa9573
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -205,8 +205,8 @@ nano::upnp_state::~upnp_state ()
if (devices)
{
freeUPNPDevlist (devices);
devices = nullptr;
}
FreeUPNPUrls (&urls);
}
nano::upnp_state & nano::upnp_state::operator= (nano::upnp_state && other_a)
@ -221,6 +221,7 @@ nano::upnp_state & nano::upnp_state::operator= (nano::upnp_state && other_a)
}
devices = other_a.devices;
other_a.devices = nullptr;
FreeUPNPUrls (&urls);
urls = other_a.urls;
other_a.urls = { 0 };
data = other_a.data;