]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not reference destroyed diskless entries when they are released
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 8 Feb 2011 01:50:19 +0000 (18:50 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 8 Feb 2011 01:50:19 +0000 (18:50 -0700)
during store rebuild.

src/store.cc

index 4c70ad6388f6521c41fd90cf6eec0e8b5c5e2595..e21f77d1e56703677bc58bdb884fc0e8d6e572e3 100644 (file)
@@ -1265,11 +1265,13 @@ StoreEntry::release()
             lock_count++;
             setReleaseFlag();
             LateReleaseStack.push_back(this);
-            PROF_stop(storeRelease);
-            return;
         } else {
             destroyStoreEntry(static_cast<hash_link *>(this));
+            // "this" is no longer valid
         }
+
+        PROF_stop(storeRelease);
+        return;
     }
 
     storeLog(STORE_LOG_RELEASE, this);