From 8f553d8d3cbdf372ddbcbdaab48ef16296d3872c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Oct 2006 20:51:17 +0000 Subject: r19078: talloc_strdup can fail (This used to be commit 2b3b9ce2a122ec5fd945728c117c321087d85203) --- source3/locking/locking.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/locking/locking.c') diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 371f1b474c..fbe22f4e1d 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -562,12 +562,18 @@ static BOOL parse_share_modes(TDB_DATA dbuf, struct share_mode_lock *lck) (lck->num_share_modes * sizeof(struct share_mode_entry)) + data->u.s.delete_token_size ); + if (lck->servicepath == NULL) { + smb_panic("talloc_strdup failed\n"); + } lck->filename = talloc_strdup(lck, 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("talloc_strdup failed\n"); + } /* * Ensure that each entry has a real process attached. -- cgit