Skip to content

Commit 2dfa46c

Browse files
author
Ananth Bhaskararaman
committed
fix: nil pointer dereference
1 parent 8d725bb commit 2dfa46c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tinyca/ca.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (ca *CA) IssueCertificate(asn1CSR []byte, notBefore, notAfter time.Time) ([
254254

255255
// Stop releases resources held by the CA.
256256
func (ca *CA) Stop() {
257-
if ca.gh != nil {
257+
if ca.gh != nil && ca.gh.wg != nil {
258258
ca.gh.wg.Wait()
259259
}
260260
}

0 commit comments

Comments
 (0)