Don't close fd, will be done in error handler

SVN revision: 46827
This commit is contained in:
Sebastian Dransfeld 2010-03-03 12:27:32 +00:00
parent 4177422a6b
commit 0903581396
1 changed files with 1 additions and 5 deletions

View File

@ -179,11 +179,7 @@ main()
snprintf(file, sizeof(file), "%s/.efreet/lock", efreet_home_dir_get());
fd = open(file, O_CREAT | O_TRUNC | O_RDONLY, S_IRUSR | S_IWUSR);
if (fd < 0) goto efreet_error;
if (flock(fd, LOCK_EX | LOCK_NB) < 0)
{
close(fd);
goto efreet_error;
}
if (flock(fd, LOCK_EX | LOCK_NB) < 0) goto efreet_error;
/* create dir for desktop cache */
dir = ecore_file_dir_get(efreet_desktop_cache_file());