s3: Fix the talloc hierarchy in fetch_share_mode_unlocked
[kai/samba.git] / source3 / locking / share_mode_lock.c
index 3b353d6793f365c234f399f0599e551e88320af4..002a399af7806b7ad7b24187fc68c67fe1b52fc8 100644 (file)
@@ -454,7 +454,7 @@ struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
                TALLOC_FREE(data.dptr);
                return NULL;
        }
-       lck->data = parse_share_modes(mem_ctx, data);
+       lck->data = parse_share_modes(lck, data);
        TALLOC_FREE(data.dptr);
        if (lck->data == NULL) {
                TALLOC_FREE(lck);