Skip to content

Instantly share code, notes, and snippets.

@tamird
Created February 26, 2016 19:11
Show Gist options
  • Save tamird/64b400455ba972e84928 to your computer and use it in GitHub Desktop.
Save tamird/64b400455ba972e84928 to your computer and use it in GitHub Desktop.
diff --git a/src/crypto/tls/conn.go b/src/crypto/tls/conn.go
index 0377568..c989cd2 100644
--- a/src/crypto/tls/conn.go
+++ b/src/crypto/tls/conn.go
@@ -774,6 +774,9 @@ func (c *Conn) writeRecord(typ recordType, data []byte) (n int, err error) {
data = data[m:]
}
c.out.freeBlock(b)
+ if err != nil {
+ return err
+ }
if typ == recordTypeChangeCipherSpec {
err = c.out.changeCipherSpec()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment