shithub: hugo

Download patch

ref: 03e2d7462dec17c2f623a13db709f9efc88182af
parent: ea96e1dc554efb86cba561d77a4bb2ae9d6e3662
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Mon Nov 25 05:09:18 EST 2019

hubolig: Fix potential data race

Fixes #6478

--- a/hugolib/pages_map.go
+++ b/hugolib/pages_map.go
@@ -442,7 +442,7 @@
 func (b *pagesMapBucket) getPagesAndSections() page.Pages {
 	b.pagesAndSectionsInit.Do(func() {
 		var pas page.Pages
-		pas = append(pas, b.pages...)
+		pas = append(pas, b.getPages()...)
 		for _, p := range b.bucketSections {
 			pas = append(pas, p.owner)
 		}