Commit 644ffc06 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

http2: don't add *Response to activeRes in Transport on Headers.END_STREA

Prevents a memory leak.

Tests (to be updated) in Go standard library.

Updates golang/go#14084

Change-Id: I3ff602a013bb8fda7a17bccb31beadb08421ae6a
Reviewed-on: https://go-review.googlesource.com/19134Reviewed-by: 's avatarBlake Mizerany <blake.mizerany@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d513e585
......@@ -1264,10 +1264,10 @@ func (rl *clientConnReadLoop) processHeaderBlockFragment(frag []byte, streamID u
res.ContentLength = -1
res.Body = &gzipReader{body: res.Body}
}
rl.activeRes[cs.ID] = cs
}
cs.resTrailer = &res.Trailer
rl.activeRes[cs.ID] = cs
cs.resc <- resAndError{res: res}
rl.nextRes = nil // unused now; will be reset next HEADERS frame
return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment