FAQ
Reviewers: r,

Message:
Hello r@golang.org (cc: andybons@gmail.com,
golang-dev@googlegroups.com),

I'd like you to review this change to
https://code.google.com/p/go/


Description:
image/gif: close the lzw.Reader we create.

The lzw.NewReader doc comment says, "It is the caller's responsibility
to call Close on the ReadCloser when finished reading."

Thanks to Andrew Bonventre for noticing this.

Please review this at https://codereview.appspot.com/10821043/

Affected files:
    M src/pkg/image/gif/reader.go


Index: src/pkg/image/gif/reader.go
===================================================================
--- a/src/pkg/image/gif/reader.go
+++ b/src/pkg/image/gif/reader.go
@@ -190,6 +190,7 @@
      // A wonderfully Go-like piece of magic.
      br := &blockReader{r: d.r}
      lzwr := lzw.NewReader(br, lzw.LSB, int(litWidth))
+ defer lzwr.Close()
      if _, err = io.ReadFull(lzwr, m.Pix); err != nil {
       if err != io.ErrUnexpectedEOF {
        return err


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • David Symonds at Jul 1, 2013 at 6:36 am
    LGTM

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Adg at Jul 1, 2013 at 6:37 am
    LGTM

    https://codereview.appspot.com/10821043/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJul 1, '13 at 6:29a
activeJul 1, '13 at 6:37a
posts3
users3
websitegolang.org

3 users in discussion

Nigeltao: 1 post David Symonds: 1 post Adg: 1 post

People

Translate

site design / logo © 2022 Grokbase