diff options
author | Not Zed <NotZed@Ximian.com> | 2001-08-01 14:46:39 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-08-01 14:46:39 +0800 |
commit | 0ff44374fd277fe0663550bf7dc8348680bd5731 (patch) | |
tree | 11a9ddef98cb36fcc2169343b40e08d1017bc34d /camel/providers/local | |
parent | 6f22eb642b794def699ce9341219f56d793a50fb (diff) | |
download | gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.tar gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.tar.gz gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.tar.bz2 gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.tar.lz gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.tar.xz gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.tar.zst gsoc2013-evolution-0ff44374fd277fe0663550bf7dc8348680bd5731.zip |
If we fail to get the lock, make sure we close our locking fd, and reset
2001-08-01 Not Zed <NotZed@Ximian.com>
* providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
get the lock, make sure we close our locking fd, and reset it.
Fixes the crash part of 5095.
svn path=/trunk/; revision=11538
Diffstat (limited to 'camel/providers/local')
-rw-r--r-- | camel/providers/local/camel-mbox-folder.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c index 1bab553ecf..ccdce9c61e 100644 --- a/camel/providers/local/camel-mbox-folder.c +++ b/camel/providers/local/camel-mbox-folder.c @@ -153,7 +153,13 @@ static int mbox_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *e return -1; } - return camel_lock_folder(lf->folder_path, mf->lockfd, type, ex); + if (camel_lock_folder(lf->folder_path, mf->lockfd, type, ex) == -1) { + close(mf->lockfd); + mf->lockfd = -1; + return -1; + } + + return 0; } static void mbox_unlock(CamelLocalFolder *lf) |