sqlite: fix nil deref on missing response (#32)

This commit is contained in:
Martin Holst Swende 2020-10-11 19:12:04 +02:00 committed by GitHub
parent fedb425381
commit 98dacbe849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -502,6 +502,9 @@ func (c *Client) queryHeaders(
}
defer resHeadersStmt.Close()
for i := range reqLogs {
if reqLogs[i].Response == nil {
continue
}
headers, err := findHeaders(ctx, resHeadersStmt, reqLogs[i].Response.ID)
if err != nil {
return fmt.Errorf("could not query response headers: %v", err)