summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-07 12:57:10 +0100
committerVolker Lendecke <vl@samba.org>2008-01-07 21:18:20 +0100
commitfa6d7b42f1c85004a7c7ece4822277e8e23f32f5 (patch)
tree15f2198f549854891701559594dabdc54af31bdc
parentc3c19615c16a2a2dc7d3620d7117b9f261e5c35a (diff)
downloadsamba-fa6d7b42f1c85004a7c7ece4822277e8e23f32f5.tar.gz
samba-fa6d7b42f1c85004a7c7ece4822277e8e23f32f5.tar.bz2
samba-fa6d7b42f1c85004a7c7ece4822277e8e23f32f5.zip
Do not talloc_strdup filename and servicepath
(This used to be commit 66be770993acf4e1673e9615bcddb21768c33e62)
-rw-r--r--source3/locking/locking.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 270c6d2261..2ec8cd2938 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -585,22 +585,14 @@ static bool parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck)
}
/* Save off the associated service path and filename. */
- lck->servicepath = talloc_strdup(lck, (const char *)dbuf.dptr + sizeof(*data) +
- (lck->num_share_modes *
- sizeof(struct share_mode_entry)) +
- data->u.s.delete_token_size );
- if (lck->servicepath == NULL) {
- smb_panic("parse_share_modes: talloc_strdup failed");
- }
-
- lck->filename = talloc_strdup(lck, (const char *)dbuf.dptr + sizeof(*data) +
- (lck->num_share_modes *
- sizeof(struct share_mode_entry)) +
- data->u.s.delete_token_size +
- strlen(lck->servicepath) + 1 );
- if (lck->filename == NULL) {
- smb_panic("parse_share_modes: talloc_strdup failed");
- }
+ lck->servicepath = (const char *)dbuf.dptr + sizeof(*data) +
+ (lck->num_share_modes * sizeof(struct share_mode_entry)) +
+ data->u.s.delete_token_size;
+
+ lck->filename = (const char *)dbuf.dptr + sizeof(*data) +
+ (lck->num_share_modes * sizeof(struct share_mode_entry)) +
+ data->u.s.delete_token_size +
+ strlen(lck->servicepath) + 1;
/*
* Ensure that each entry has a real process attached.