summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-09 08:45:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:53 -0500
commit014a596f426721fcf15014a735051d951b186208 (patch)
treefd7f63ff052167ccea66894bdf067291c756882b /source3/locking
parent65f7a9d084ec455a0c8a504c978e49b56e37af32 (diff)
downloadsamba-014a596f426721fcf15014a735051d951b186208.tar.gz
samba-014a596f426721fcf15014a735051d951b186208.tar.bz2
samba-014a596f426721fcf15014a735051d951b186208.zip
r23759: Fix make test -- sorry
(This used to be commit cbbc70604e815f4ffd25d040ca0a4ef58e651523)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 9b8dcfd15e..9b90d87ff0 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1642,8 +1642,8 @@ static struct byte_range_lock *brl_get_locks_internal(TALLOC_CTX *mem_ctx,
talloc_set_destructor(br_lck, byte_range_lock_destructor);
br_lck->num_locks = data.dsize / sizeof(struct lock_struct);
- if (!(br_lck->lock_data = SMB_MALLOC_ARRAY(
- struct lock_struct, br_lck->num_locks))) {
+ br_lck->lock_data = SMB_MALLOC_ARRAY(struct lock_struct, br_lck->num_locks);
+ if ((br_lck->num_locks != 0) && (br_lck->lock_data == NULL)) {
DEBUG(0, ("malloc failed\n"));
TALLOC_FREE(br_lck);
return NULL;