summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-04 23:27:14 +0100
committerVolker Lendecke <vl@samba.org>2008-01-04 23:32:24 +0100
commita8d2664fec3867cc40894531615a9a2d8036fa25 (patch)
treefc232746ccc81c0292fe019857b58d81e29ee8bd
parent395c366237dec1a38a53248d2e8df17f877207aa (diff)
downloadsamba-a8d2664fec3867cc40894531615a9a2d8036fa25.tar.gz
samba-a8d2664fec3867cc40894531615a9a2d8036fa25.tar.bz2
samba-a8d2664fec3867cc40894531615a9a2d8036fa25.zip
allocate share_mode_str only when needed
(This used to be commit a98693bfa7bfe72ffa164d21b3e9636e268708aa)
-rw-r--r--source3/locking/locking.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index dab21e53b3..270c6d2261 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -608,7 +608,10 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck)
for (i = 0; i < lck->num_share_modes; i++) {
struct share_mode_entry *entry_p = &lck->share_modes[i];
- char *str = share_mode_str(NULL, i, entry_p);
+ char *str = NULL;
+ if (DEBUGLEVEL >= 10) {
+ str = share_mode_str(NULL, i, entry_p);
+ }
DEBUG(10,("parse_share_modes: %s\n",
str ? str : ""));
if (!process_exists(entry_p->pid)) {