From e7dcc5a65330de7da9513446cec081096698ce92 Mon Sep 17 00:00:00 2001 From: Yoan Blanc Date: Thu, 10 Nov 2016 10:36:18 +0100 Subject: [PATCH] Do not free a pointer you don't own --- vips.go | 1 - 1 file changed, 1 deletion(-) diff --git a/vips.go b/vips.go index cbf2304..0553170 100644 --- a/vips.go +++ b/vips.go @@ -531,7 +531,6 @@ func readImageType(buf []byte) string { length := C.size_t(len(buf)) imageBuf := unsafe.Pointer(&buf[0]) load := C.vips_foreign_find_load_buffer(imageBuf, length) - defer C.free(imageBuf) return C.GoString(load) }