summaryrefslogtreecommitdiff
path: root/libddekit
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-02-28 05:29:56 +0100
committerZheng Da <zhengda1936@gmail.com>2010-02-28 05:29:56 +0100
commit7634fec1207d53f452a257c9cb0fc4986a211709 (patch)
treebd743466e93497849f47dcc7035ae3a0ff54aa02 /libddekit
parentfbb1c9f5d35a8b89bbebb55a4a49c3da2f189c05 (diff)
reset the helder pointer before unlock in ddekit lock.
I don't know if it helps fix any bugs, but it should be a right thing to do.
Diffstat (limited to 'libddekit')
-rw-r--r--libddekit/lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libddekit/lock.c b/libddekit/lock.c
index 4c4cff01..e534bebe 100644
--- a/libddekit/lock.c
+++ b/libddekit/lock.c
@@ -39,9 +39,9 @@ int _ddekit_lock_try_lock(struct ddekit_lock **mtx) {
}
void _ddekit_lock_unlock(struct ddekit_lock **mtx) {
- mutex_unlock (&(*mtx)->lock);
// TODO I wonder if it can cause any trouble.
(*mtx)->helder = NULL;
+ mutex_unlock (&(*mtx)->lock);
}