diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 630a903120c0..4575e96e406a 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -157,6 +157,9 @@ nsJARChannel::nsJARChannel() nsJARChannel::~nsJARChannel() { + // with the exception of certain error cases mJarInput will already be null. + NS_IF_RELEASE(mJarInput); + // release owning reference to the jar handler nsJARProtocolHandler *handler = gJarHandler; NS_RELEASE(handler); // NULL parameter diff --git a/netwerk/protocol/jar/src/nsJARChannel.cpp b/netwerk/protocol/jar/src/nsJARChannel.cpp index 630a903120c0..4575e96e406a 100644 --- a/netwerk/protocol/jar/src/nsJARChannel.cpp +++ b/netwerk/protocol/jar/src/nsJARChannel.cpp @@ -157,6 +157,9 @@ nsJARChannel::nsJARChannel() nsJARChannel::~nsJARChannel() { + // with the exception of certain error cases mJarInput will already be null. + NS_IF_RELEASE(mJarInput); + // release owning reference to the jar handler nsJARProtocolHandler *handler = gJarHandler; NS_RELEASE(handler); // NULL parameter