From 334cb492bd341132a918029c857610454c8d6cb6 Mon Sep 17 00:00:00 2001 From: Jason Duell Date: Sun, 25 Apr 2010 18:56:51 -0700 Subject: [PATCH] Bug 561526: NS_RELEASE nulls out gHttpHandler, causing segfaults at next use. r=dwitte,jdm sr=biesi --- netwerk/protocol/http/src/HttpBaseChannel.cpp | 3 +-- netwerk/protocol/http/src/HttpChannelParent.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/netwerk/protocol/http/src/HttpBaseChannel.cpp b/netwerk/protocol/http/src/HttpBaseChannel.cpp index d5b7ff83a61..511181a26b3 100644 --- a/netwerk/protocol/http/src/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/src/HttpBaseChannel.cpp @@ -69,8 +69,7 @@ HttpBaseChannel::~HttpBaseChannel() { LOG(("Destroying HttpBaseChannel @%x\n", this)); - nsHttpHandler* handler = gHttpHandler; - NS_RELEASE(handler); + gHttpHandler->Release(); } nsresult diff --git a/netwerk/protocol/http/src/HttpChannelParent.cpp b/netwerk/protocol/http/src/HttpChannelParent.cpp index 67b36395031..6ef88b928b1 100644 --- a/netwerk/protocol/http/src/HttpChannelParent.cpp +++ b/netwerk/protocol/http/src/HttpChannelParent.cpp @@ -58,7 +58,7 @@ HttpChannelParent::HttpChannelParent() HttpChannelParent::~HttpChannelParent() { - NS_RELEASE(gHttpHandler); + gHttpHandler->Release(); } //-----------------------------------------------------------------------------