summaryrefslogtreecommitdiff
path: root/sftp-server-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp-server-main.c')
-rw-r--r--sftp-server-main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sftp-server-main.c b/sftp-server-main.c
index 7e644ab89..c6ccd623e 100644
--- a/sftp-server-main.c
+++ b/sftp-server-main.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-server-main.c,v 1.4 2009/02/21 19:32:04 tobias Exp $ */ 1/* $OpenBSD: sftp-server-main.c,v 1.5 2016/02/15 09:47:49 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Markus Friedl. All rights reserved. 3 * Copyright (c) 2008 Markus Friedl. All rights reserved.
4 * 4 *
@@ -26,6 +26,7 @@
26#include "log.h" 26#include "log.h"
27#include "sftp.h" 27#include "sftp.h"
28#include "misc.h" 28#include "misc.h"
29#include "xmalloc.h"
29 30
30void 31void
31cleanup_exit(int i) 32cleanup_exit(int i)
@@ -38,6 +39,7 @@ main(int argc, char **argv)
38{ 39{
39 struct passwd *user_pw; 40 struct passwd *user_pw;
40 41
42 ssh_malloc_init(); /* must be called before any mallocs */
41 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 43 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
42 sanitise_stdfd(); 44 sanitise_stdfd();
43 45