shithub: riscv

Download patch

ref: 35a8152ebc0edc2a6cc6b1e37a08ff8e31033703
parent: 18521fc8c6a6d307013bafe2afad995ace0aea02
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Thu Oct 28 11:26:57 EDT 2021

git/pack: check pf->pack for nil before Bterming it

--- a/sys/src/cmd/git/pack.c
+++ b/sys/src/cmd/git/pack.c
@@ -281,7 +281,7 @@
 static void
 closepack(Packf *pf)
 {
-	if(--pf->refs == 0){
+	if(--pf->refs == 0 && pf->pack != nil){
 		Bterm(pf->pack);
 		pf->pack = nil;
 	}