Bug 1324995: only free AdapterAddresses if needed. r?bwc
MozReview-Commit-ID: 8C4yPsGGPoV
--- a/media/mtransport/third_party/nICEr/src/stun/addrs.c
+++ b/media/mtransport/third_party/nICEr/src/stun/addrs.c
@@ -238,17 +238,19 @@ stun_get_win32_addrs(nr_local_addr addrs
}
}
done:
*count = n;
_status = 0;
abort:
- RFREE(AdapterAddresses);
+ if (AdapterAddresses) {
+ RFREE(AdapterAddresses);
+ }
return _status;
}
#else /* WIN32 */
static int
nr_stun_is_duplicate_addr(nr_local_addr addrs[], int count, nr_local_addr *addr);