Bug 946998 - Initialize UDPSocketParent pointer to nullptr. r=jduell
authorChris Peterson <cpeterson@mozilla.com>
Thu, 05 Dec 2013 15:41:46 -0800
changeset 159469 b372181af8e76191b5202590cb66cd3d822d3bbd
parent 159468 97d17b777f684ce75022586c71a98bc8b178802e
child 159470 7713c80c1028137688900d06320e2c4885654186
push id37314
push userryanvm@gmail.com
push dateMon, 09 Dec 2013 02:58:47 +0000
treeherdermozilla-inbound@b372181af8e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs946998
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 946998 - Initialize UDPSocketParent pointer to nullptr. r=jduell
netwerk/ipc/NeckoParent.cpp
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -378,17 +378,17 @@ NeckoParent::DeallocPTCPServerSocketPare
   return true;
 }
 
 PUDPSocketParent*
 NeckoParent::AllocPUDPSocketParent(const nsCString& aHost,
                                    const uint16_t& aPort,
                                    const nsCString& aFilter)
 {
-  UDPSocketParent* p;
+  UDPSocketParent* p = nullptr;
 
   // Only allow socket if it specifies a valid packet filter.
   nsAutoCString contractId(NS_NETWORK_UDP_SOCKET_FILTER_HANDLER_PREFIX);
   contractId.Append(aFilter);
 
   if (!aFilter.IsEmpty()) {
     nsCOMPtr<nsIUDPSocketFilterHandler> filterHandler =
       do_GetService(contractId.get());