diff --git a/History.md b/History.md index 6ccc297..22c7b2d 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,7 @@ +## 1.0.1 / 22-06-2016 + +- fix(#90): Do not not dereference the original image a second time. + ## 1.0.0 / 21-04-2016 - refactor(api): breaking changes: normalize public members to follow Go naming idioms. diff --git a/version.go b/version.go index c0bf70e..4766bcd 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package bimg // Version represents the current package semantic version. -const Version = "1.0.0" +const Version = "1.0.1" diff --git a/vips.go b/vips.go index 6b74199..5829e24 100644 --- a/vips.go +++ b/vips.go @@ -318,9 +318,12 @@ func vipsSave(image *C.VipsImage, o vipsSaveOptions) ([]byte, error) { if err != nil { return nil, err } - //When an image has an unsupported color space, vipsPreSave returns the pointer of the image passed to it unmodified. - //When this occurs, we must take care to not dereference the original image a second time; - //we may otherwise erroneously free the object twice + + // When an image has an unsupported color space, vipsPreSave + // returns the pointer of the image passed to it unmodified. + // When this occurs, we must take care to not dereference the + // original image a second time; we may otherwise erroneously + // free the object twice. if tmpImage != image { defer C.g_object_unref(C.gpointer(tmpImage)) }