summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index e4d06b8bfd..d79d73099b 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -782,10 +782,7 @@ struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
const char *fname)
{
struct share_mode_lock *lck;
- TDB_DATA key;
-
- key.dptr = (unsigned char *)&id;
- key.dsize = sizeof(id);
+ TDB_DATA key = locking_key(id);
if (!(lck = TALLOC_P(mem_ctx, struct share_mode_lock))) {
DEBUG(0, ("talloc failed\n"));