Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#914 closed Bug (fixed)

lockpath string should be freed conditionally

Reported by: denisleroy Owned by: charles
Priority: Normal Milestone: 1.20
Component: GTK+ Client Version: 1.11
Severity: Major Keywords:
Cc:

Description

The gl_lockpath string should be freed conditionally since it is not always created (it's only created if app was able to create a lock file, i.e. when no other instances of transmission are running).

--- transmission-1.11/gtk/conf.c~	2008-04-04 21:27:33.000000000 +0200
+++ transmission-1.11/gtk/conf.c	2008-05-02 18:11:16.000000000 +0200
@@ -103,8 +103,10 @@
 static void
 cf_removelocks( void )
 {
-    g_unlink( gl_lockpath );
-    g_free( gl_lockpath );
+    if ( gl_lockpath ) {
+	g_unlink( gl_lockpath );
+	g_free( gl_lockpath );
+    }
 }
 
 /* errstr may be NULL, this might be called before GTK is initialized */

Change History (2)

comment:1 Changed 14 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed

committed in r5753.

comment:2 Changed 14 years ago by charles

  • Milestone changed from None Set to 1.20
Note: See TracTickets for help on using tickets.