mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-20 04:36:31 -07:00
Merge pull request #367 from Keruspe/segv
unref the image *after* we used it
This commit is contained in:
commit
d0fb333ce4
1 changed files with 2 additions and 1 deletions
3
vips.go
3
vips.go
|
|
@ -388,8 +388,9 @@ func vipsInterpretationBuffer(buf []byte) (Interpretation, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return InterpretationError, err
|
return InterpretationError, err
|
||||||
}
|
}
|
||||||
|
interp := vipsInterpretation(image)
|
||||||
C.g_object_unref(C.gpointer(image))
|
C.g_object_unref(C.gpointer(image))
|
||||||
return vipsInterpretation(image), nil
|
return interp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func vipsInterpretation(image *C.VipsImage) Interpretation {
|
func vipsInterpretation(image *C.VipsImage) Interpretation {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue