Bug 1324995: only free AdapterAddresses if needed. r?bwc draft
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Tue, 20 Dec 2016 23:20:01 -0800
changeset 452163 5599aa35f17ac5aa20ff50b8fbc2fed132c76882
parent 451111 d4b3146a5567a7ddbcdfa5244945db55616cb8d1
child 540161 9bef39d5877ea48dda4f15a418404c27c6fbda67
push id39332
push userdrno@ohlmeier.org
push dateWed, 21 Dec 2016 07:20:25 +0000
reviewersbwc
bugs1324995
milestone53.0a1
Bug 1324995: only free AdapterAddresses if needed. r?bwc MozReview-Commit-ID: 8C4yPsGGPoV
media/mtransport/third_party/nICEr/src/stun/addrs.c
--- 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);