mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-14 14:27:14 +01:00
girffi: Fix ffi_cif leaks on error return paths
Spotted by scan-build. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
4141eea257
commit
39f0e6d435
@ -417,7 +417,7 @@ gi_callable_info_create_closure (GICallableInfo *callable_info,
|
||||
if (status != FFI_OK)
|
||||
{
|
||||
g_warning ("ffi_prep_cif failed: %d", status);
|
||||
ffi_closure_free (closure);
|
||||
gi_callable_info_destroy_closure (callable_info, &closure->ffi_closure);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ gi_callable_info_create_closure (GICallableInfo *callable_info,
|
||||
if (status != FFI_OK)
|
||||
{
|
||||
g_warning ("ffi_prep_closure failed: %d", status);
|
||||
ffi_closure_free (closure);
|
||||
gi_callable_info_destroy_closure (callable_info, &closure->ffi_closure);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user