Do not free a pointer you don't own

This commit is contained in:
Yoan Blanc 2016-11-10 10:36:18 +01:00
parent b7e65e7018
commit e7dcc5a653
No known key found for this signature in database
GPG key ID: 6058CF4574298812

View file

@ -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)
}