Avoid leaking memory from FFI closure if no segfault risk

This commit is contained in:
Cimbali 2021-11-01 19:31:58 +01:00 committed by Emmanuele Bassi
parent 8e96029a32
commit f77269c480

View File

@ -494,4 +494,7 @@ g_callable_info_prepare_closure (GICallableInfo *callable_info,
void g_callable_info_free_closure (GICallableInfo *callable_info, ffi_closure *closure) void g_callable_info_free_closure (GICallableInfo *callable_info, ffi_closure *closure)
{ {
g_warning ("g_callable_info_free_closure is deprecated and leaks memory\n"); g_warning ("g_callable_info_free_closure is deprecated and leaks memory\n");
#ifdef LEGACY_GIRFFI_FREE
g_callable_info_destroy_closure(callable_info, closure);
#endif
} }