index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Helder Martins <heldermartins89@gmail.com> | 2011-08-29 22:07:26 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-29 19:56:24 -0500 |
commit | d74dad79b7770725090e1eb2a015cbd6f88aed66 (patch) | |
tree | 72e70f1b0173cf3c016784ad227e61ed5b895995 /lib/libalpm/handle.c | |
parent | 515720a6fcc54c35420b5b5cf9258c8f2b5dc01b (diff) |
-rw-r--r-- | lib/libalpm/handle.c | 7 |
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 266b4bc8..b9d71db8 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -132,10 +132,9 @@ int _alpm_handle_unlock(alpm_handle_t *handle) ASSERT(handle->lockfile != NULL, return -1); ASSERT(handle->lckstream != NULL, return 0); - if(handle->lckstream != NULL) { - fclose(handle->lckstream); - handle->lckstream = NULL; - } + fclose(handle->lckstream); + handle->lckstream = NULL; + if(unlink(handle->lockfile) && errno != ENOENT) { return -1; } |