fix possible memleak
fix tiny leak if output options failed
This commit is contained in:
parent
a17ef9b7c8
commit
daf075112d
10
TODO
10
TODO
@ -1,13 +1,3 @@
|
|||||||
- try:
|
|
||||||
|
|
||||||
$ vips system "vips add %s %s %s" --in "k2.jpg k4.jpg" \
|
|
||||||
--out-format "%s.tif" --out x.v --log
|
|
||||||
memory: high-water mark 9.37 MB
|
|
||||||
""
|
|
||||||
memory: high-water mark 27.89 MB
|
|
||||||
$
|
|
||||||
|
|
||||||
but x.v does not appear
|
|
||||||
|
|
||||||
- can we use postbuild elsewhere? look at use of "preclose" / "written", etc.
|
- can we use postbuild elsewhere? look at use of "preclose" / "written", etc.
|
||||||
|
|
||||||
|
@ -793,10 +793,14 @@ vips_call_option_output( VipsObject *object,
|
|||||||
result = vips_object_get_argument_to_string( object,
|
result = vips_object_get_argument_to_string( object,
|
||||||
g_param_spec_get_name( pspec ), output->value );
|
g_param_spec_get_name( pspec ), output->value );
|
||||||
|
|
||||||
|
return( result );
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
vips_call_option_output_free( VipsObject *object, VipsCallOptionOutput *output )
|
||||||
|
{
|
||||||
VIPS_FREE( output->value );
|
VIPS_FREE( output->value );
|
||||||
g_free( output );
|
g_free( output );
|
||||||
|
|
||||||
return( result );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -866,6 +870,9 @@ vips_call_options_set( const gchar *option_name, const gchar *value,
|
|||||||
g_signal_connect( operation, "postbuild",
|
g_signal_connect( operation, "postbuild",
|
||||||
G_CALLBACK( vips_call_option_output ),
|
G_CALLBACK( vips_call_option_output ),
|
||||||
output );
|
output );
|
||||||
|
g_signal_connect( operation, "close",
|
||||||
|
G_CALLBACK( vips_call_option_output_free ),
|
||||||
|
output );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user