aboutsummaryrefslogtreecommitdiff
path: root/src/sftpserver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sftpserver.c')
-rw-r--r--src/sftpserver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sftpserver.c b/src/sftpserver.c
index 820e9668..b94349f7 100644
--- a/src/sftpserver.c
+++ b/src/sftpserver.c
@@ -457,11 +457,10 @@ ssh_string sftp_handle_alloc(sftp_session sftp, void *info) {
int i;
if (sftp->handles == NULL) {
- sftp->handles = malloc(sizeof(void *) * SFTP_HANDLES);
+ sftp->handles = calloc(SFTP_HANDLES, sizeof(void *));
if (sftp->handles == NULL) {
return NULL;
}
- memset(sftp->handles, 0, sizeof(void *) * SFTP_HANDLES);
}
for (i = 0; i < SFTP_HANDLES; i++) {