diff --git a/mozilla/content/svg/content/src/nsSVGValue.cpp b/mozilla/content/svg/content/src/nsSVGValue.cpp index 2b5097a73c1..ea235ea00bf 100644 --- a/mozilla/content/svg/content/src/nsSVGValue.cpp +++ b/mozilla/content/svg/content/src/nsSVGValue.cpp @@ -108,8 +108,10 @@ nsSVGValue::AddObserver(nsISVGValueObserver* observer) // stroke and fill. Safe, as on a style change we remove both, as // the change notification isn't fine grained, and re-add as // appropriate. - if (mObservers.IndexOf((void*)wr) >= 0) + if (mObservers.IndexOf((void*)wr) >= 0) { + NS_RELEASE(wr); return NS_OK; + } mObservers.AppendElement((void*)wr); return NS_OK;