From fa6d7b42f1c85004a7c7ece4822277e8e23f32f5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 7 Jan 2008 12:57:10 +0100 Subject: Do not talloc_strdup filename and servicepath (This used to be commit 66be770993acf4e1673e9615bcddb21768c33e62) --- source3/locking/locking.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'source3') 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. -- cgit