]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) fix a minor memory leak in gtr_open_file(). reported by clang static...
authorJordan Lee <jordan@transmissionbt.com>
Tue, 24 Jan 2012 18:09:12 +0000 (18:09 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Tue, 24 Jan 2012 18:09:12 +0000 (18:09 +0000)
gtk/util.c

index 7ca3d5967e9b802c2e12e34cb554393e91c89639..e86567841c1737a73c65530a8cbbb603807ce3a3 100644 (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 ) )