summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-10-04 20:51:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:09 -0500
commit8f553d8d3cbdf372ddbcbdaab48ef16296d3872c (patch)
treebbe2063fffd3345430b6637ac85c7eed7639d2fe /source3/locking
parentf27d5c7838eb0183baaedb3deb33cdfe7327c917 (diff)
downloadsamba-8f553d8d3cbdf372ddbcbdaab48ef16296d3872c.tar.gz
samba-8f553d8d3cbdf372ddbcbdaab48ef16296d3872c.tar.bz2
samba-8f553d8d3cbdf372ddbcbdaab48ef16296d3872c.zip
r19078: talloc_strdup can fail
(This used to be commit 2b3b9ce2a122ec5fd945728c117c321087d85203)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c6
1 files changed, 6 insertions, 0 deletions
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.