summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_netatalk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index 68f6a31083..d5a85b3390 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -131,7 +131,7 @@ static void atalk_add_to_list(name_compare_entry **list)
}
}
- if (!(new_list = SMB_CALLOC_ARRAY(name_compare_entry, (count == 0 ? 1 : count + 1))))
+ if (!(new_list = SMB_CALLOC_ARRAY(name_compare_entry, count + 2)))
return;
for (i = 0; i < count; i ++) {