From 815aec8241b2da93a193eb8d3b3adbfdef5c1d90 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Nov 2007 14:45:19 +0100 Subject: Add a comment (This used to be commit 144014096a41de293ce7ec15f82681a469dd3aa1) --- source3/locking/locking.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 0cedff36e4..eb7531d9a0 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -474,8 +474,14 @@ static void print_share_mode_table(struct locking_data *data) struct share_mode_entry entry; char *str; + /* + * We need to memcpy the entry here due to alignment + * restrictions that are not met when directly accessing + * shares[i] + */ + memcpy(&entry, &shares[i], sizeof(struct share_mode_entry)); - str = share_mode_str(NULL, i, &entry); + str = share_mode_str(talloc_tos(), i, &entry); DEBUG(10,("print_share_mode_table: %s\n", str ? str : "")); TALLOC_FREE(str); -- cgit