summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-11-18 14:24:54 +0100
committerJeremy Allison <jra@samba.org>2007-11-18 15:08:52 -0800
commitb82120f9b7f5aad83d8b4ece0261e9693eedca0c (patch)
tree4025509b174364136d3f39c32bc067d1852c000f
parent8b0bee7c7688a966777f502c97922d7ad40d841c (diff)
downloadsamba-b82120f9b7f5aad83d8b4ece0261e9693eedca0c.tar.gz
samba-b82120f9b7f5aad83d8b4ece0261e9693eedca0c.tar.xz
samba-b82120f9b7f5aad83d8b4ece0261e9693eedca0c.zip
Fix a valgrind error
-rw-r--r--source/locking/locking.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c
index 8d511e9d8fd..0cedff36e43 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -472,11 +472,12 @@ static void print_share_mode_table(struct locking_data *data)
for (i = 0; i < num_share_modes; i++) {
struct share_mode_entry entry;
- char *str = share_mode_str(NULL, i, &entry);
+ char *str;
memcpy(&entry, &shares[i], sizeof(struct share_mode_entry));
- DEBUG(10,("print_share_mode_table: %s\n",
- str ? str : ""));
+ str = share_mode_str(NULL, i, &entry);
+
+ DEBUG(10,("print_share_mode_table: %s\n", str ? str : ""));
TALLOC_FREE(str);
}
}