From 35a8152ebc0edc2a6cc6b1e37a08ff8e31033703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Thu, 28 Oct 2021 15:26:57 +0000 Subject: [PATCH] git/pack: check pf->pack for nil before Bterming it --- sys/src/cmd/git/pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/git/pack.c b/sys/src/cmd/git/pack.c index 5ec7a1b75..c86e06b29 100644 --- a/sys/src/cmd/git/pack.c +++ b/sys/src/cmd/git/pack.c @@ -281,7 +281,7 @@ openpack(Packf *pf) static void closepack(Packf *pf) { - if(--pf->refs == 0){ + if(--pf->refs == 0 && pf->pack != nil){ Bterm(pf->pack); pf->pack = nil; }