Bug 1144031 - fix use of uninitialized variable, r=mcmanus
authorDaniel Stenberg <daniel@haxx.se>
Tue, 17 Mar 2015 01:45:00 +0100
changeset 234218 f3d7d48771f95aacc10bab18653970f45b08cf84
parent 234217 54ab128ef1c058596198766ab4373c4d1a73432e
child 234219 b976b2dc1a26b3b500d7c96e14e4cce4a339e94a
push id57073
push usercbook@mozilla.com
push dateWed, 18 Mar 2015 11:00:37 +0000
treeherdermozilla-inbound@b976b2dc1a26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1144031
milestone39.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 1144031 - fix use of uninitialized variable, r=mcmanus
netwerk/base/nsProtocolProxyService.cpp
--- a/netwerk/base/nsProtocolProxyService.cpp
+++ b/netwerk/base/nsProtocolProxyService.cpp
@@ -1860,21 +1860,21 @@ nsProtocolProxyService::ApplyFilters(nsI
 {
     if (!(info.flags & nsIProtocolHandler::ALLOWS_PROXY))
         return;
 
     // We prune the proxy list prior to invoking each filter.  This may be
     // somewhat inefficient, but it seems like a good idea since we want each
     // filter to "see" a valid proxy list.
 
-    nsresult rv;
     nsCOMPtr<nsIProxyInfo> result;
 
     for (FilterLink *iter = mFilters; iter; iter = iter->next) {
         PruneProxyInfo(info, list);
+        nsresult rv = NS_OK;
         if (iter->filter) {
           nsCOMPtr<nsIURI> uri;
           rv = GetProxyURI(channel, getter_AddRefs(uri));
           if (uri) {
             rv = iter->filter->ApplyFilter(this, uri, *list,
                                            getter_AddRefs(result));
           }
         } else if (iter->channelFilter) {