shithub: hugo

Download patch

ref: 3f3187de0f62107da19d9341aebd1d8414bff0ea
parent: cc351958e12d4dc83f664a1d51be76a447fea9b8
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Dec 27 07:05:42 EST 2018

cache/namedmemcache: Fix data race

--- a/cache/namedmemcache/named_cache.go
+++ b/cache/namedmemcache/named_cache.go
@@ -68,11 +68,6 @@
 	c.nlocker.Lock(key)
 	defer c.nlocker.Unlock(key)
 
-	// Double check
-	if entry, found := c.cache[key]; found {
-		return entry.value, entry.err
-	}
-
 	// Create it.
 	value, err := create()