(trunk gtk) fix a minor memory leak in gtr_open_file(). reported by clang static analyzer.

This commit is contained in:
Jordan Lee 2012-01-24 18:09:12 +00:00
parent d37b29264d
commit 7e83c406d4
1 changed files with 2 additions and 3 deletions

View File

@ -313,7 +313,7 @@ gtr_file_trash_or_remove( const char * filename )
if( !trashed ) {
GError * err = NULL;
trashed = g_file_delete( file, NULL, &err );
g_file_delete( file, NULL, &err );
if( err ) {
g_message( "Unable to delete file \"%s\": %s", filename, err->message );
g_clear_error( &err );
@ -343,10 +343,9 @@ gtr_get_help_uri( void )
void
gtr_open_file( const char * path )
{
char * uri = NULL;
char * uri;
GFile * file = g_file_new_for_path( path );
uri = g_file_get_uri( file );
g_object_unref( G_OBJECT( file ) );
if( g_path_is_absolute( path ) )