]> granicus.if.org Git - transmission/commitdiff
(gtk) #914: lockpath string should be freed conditionally
authorCharles Kerr <charles@transmissionbt.com>
Tue, 6 May 2008 11:04:16 +0000 (11:04 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 6 May 2008 11:04:16 +0000 (11:04 +0000)
gtk/conf.c

index bde9c665f9b7a07885b28093dcfacd27ce5cd670..322c0fa8e7df1e1f4128f0eb4a0b55e46df5c216 100644 (file)
@@ -103,8 +103,10 @@ getLockFilename( void )
 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 */