summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/locks/src')
-rw-r--r--xlators/features/locks/src/inodelk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c
index 5785f1f8e..cc7160330 100644
--- a/xlators/features/locks/src/inodelk.c
+++ b/xlators/features/locks/src/inodelk.c
@@ -421,9 +421,6 @@ release_inode_locks_of_transport (xlator_t *this, pl_dom_list_t *dom,
if (l->transport != trans)
continue;
- __delete_inode_lock (l);
- __destroy_inode_lock (l);
-
inode_path (inode, NULL, &path);
if (path)
file = path;
@@ -435,10 +432,14 @@ release_inode_locks_of_transport (xlator_t *this, pl_dom_list_t *dom,
"{transport=%p, pid=%"PRId64" lk-owner=%s}",
file, trans, (uint64_t) l->client_pid,
lkowner_utoa (&l->owner));
+
if (path) {
GF_FREE (path);
path = NULL;
}
+
+ __delete_inode_lock (l);
+ __destroy_inode_lock (l);
}
}
if (path)