diff options
author | Volker Lendecke <vl@samba.org> | 2013-12-06 10:31:22 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-12-14 11:21:41 +0100 |
commit | 2a77e613cb0ca6402b5401ef9bde7a06a07ba91c (patch) | |
tree | c3319ab582134a170e852024309e09a99aee9082 /source3/locking | |
parent | 5baa7402ba8eebd9b2ddc6b259ae9bb2852b4bb1 (diff) | |
download | samba-2a77e613cb0ca6402b5401ef9bde7a06a07ba91c.tar.gz samba-2a77e613cb0ca6402b5401ef9bde7a06a07ba91c.tar.xz samba-2a77e613cb0ca6402b5401ef9bde7a06a07ba91c.zip |
smbd: Early exit
Yes, this also showed up in profiles
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/brlock.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index e92a2cf0ecb..c51d66b2be5 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -1699,10 +1699,16 @@ static bool validate_lock_entries(TALLOC_CTX *mem_ctx, unsigned int i; unsigned int num_valid_entries = 0; struct lock_struct *locks = *pplocks; - TALLOC_CTX *frame = talloc_stackframe(); + TALLOC_CTX *frame; struct server_id *ids; bool *exists; + if (*pnum_entries == 0) { + return true; + } + + frame = talloc_stackframe(); + ids = talloc_array(frame, struct server_id, *pnum_entries); if (ids == NULL) { DEBUG(0, ("validate_lock_entries: " |