fix two tiny memleaks
This commit is contained in:
parent
0aa521a09e
commit
1090f48900
@ -144,25 +144,6 @@ vips_thread_profile_save( VipsThreadProfile *profile )
|
||||
g_mutex_unlock( vips__global_lock );
|
||||
}
|
||||
|
||||
static void
|
||||
vips_thread_profile_free( VipsThreadProfile *profile )
|
||||
{
|
||||
VIPS_DEBUG_MSG( "vips_thread_profile_free: %s\n", profile->name );
|
||||
|
||||
if( vips__thread_profile )
|
||||
vips_thread_profile_save( profile );
|
||||
|
||||
VIPS_FREEF( g_hash_table_destroy, profile->gates );
|
||||
VIPS_FREE( profile );
|
||||
}
|
||||
|
||||
void
|
||||
vips__thread_profile_stop( void )
|
||||
{
|
||||
if( vips__thread_profile )
|
||||
VIPS_FREEF( fclose, vips__thread_fp );
|
||||
}
|
||||
|
||||
static void
|
||||
vips_thread_gate_block_free( VipsThreadGateBlock *block )
|
||||
{
|
||||
@ -178,6 +159,26 @@ vips_thread_gate_free( VipsThreadGate *gate )
|
||||
VIPS_FREE( gate );
|
||||
}
|
||||
|
||||
static void
|
||||
vips_thread_profile_free( VipsThreadProfile *profile )
|
||||
{
|
||||
VIPS_DEBUG_MSG( "vips_thread_profile_free: %s\n", profile->name );
|
||||
|
||||
if( vips__thread_profile )
|
||||
vips_thread_profile_save( profile );
|
||||
|
||||
VIPS_FREEF( g_hash_table_destroy, profile->gates );
|
||||
VIPS_FREEF( vips_thread_gate_free, profile->memory );
|
||||
VIPS_FREE( profile );
|
||||
}
|
||||
|
||||
void
|
||||
vips__thread_profile_stop( void )
|
||||
{
|
||||
if( vips__thread_profile )
|
||||
VIPS_FREEF( fclose, vips__thread_fp );
|
||||
}
|
||||
|
||||
static void
|
||||
vips__thread_profile_init_cb( VipsThreadProfile *profile )
|
||||
{
|
||||
|
@ -177,6 +177,8 @@ vips_thread_run( gpointer data )
|
||||
vips__buffer_shutdown();
|
||||
vips__thread_profile_detach();
|
||||
|
||||
g_free( info );
|
||||
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user