(gtk) #914: lockpath string should be freed conditionally

This commit is contained in:
Charles Kerr 2008-05-06 11:04:16 +00:00
parent 3e99ae9292
commit 18871ac609
1 changed files with 4 additions and 2 deletions

View 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 */