commit 711947df5d30fd63d1029b1828b2ad4a2854f1d6
parent b34e9bccc3b72d649071bd59cedfc0554129f044
Author: Randell Jesup <rjesup@mozilla.com>
Date: Tue, 4 Nov 2025 15:24:04 +0000
Bug 1997437: Fix null-deref when removing a compression-dictionary before the cache entry is available r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D271178
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/netwerk/cache2/Dictionary.cpp b/netwerk/cache2/Dictionary.cpp
@@ -1227,7 +1227,9 @@ already_AddRefed<DictionaryCacheEntry> DictionaryOrigin::AddEntry(
// This stops new requests from trying to use the old data we're in
// the process of replacing Remove the entry from the Origin and
// Write().
- mEntries[i]->RemoveEntry(mEntry);
+ if (mEntry) {
+ mEntries[i]->RemoveEntry(mEntry);
+ }
mEntries.RemoveElementAt(i);
}
} else {