diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.287 2017/05/31 08:09:45 markus Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.288 2017/05/31 09:15:42 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -1711,8 +1711,8 @@ session_new(void) | |||
1711 | return NULL; | 1711 | return NULL; |
1712 | debug2("%s: allocate (allocated %d max %d)", | 1712 | debug2("%s: allocate (allocated %d max %d)", |
1713 | __func__, sessions_nalloc, options.max_sessions); | 1713 | __func__, sessions_nalloc, options.max_sessions); |
1714 | tmp = xreallocarray(sessions, sessions_nalloc + 1, | 1714 | tmp = xrecallocarray(sessions, sessions_nalloc, |
1715 | sizeof(*sessions)); | 1715 | sessions_nalloc + 1, sizeof(*sessions)); |
1716 | if (tmp == NULL) { | 1716 | if (tmp == NULL) { |
1717 | error("%s: cannot allocate %d sessions", | 1717 | error("%s: cannot allocate %d sessions", |
1718 | __func__, sessions_nalloc + 1); | 1718 | __func__, sessions_nalloc + 1); |
@@ -2036,8 +2036,8 @@ session_env_req(Session *s) | |||
2036 | for (i = 0; i < options.num_accept_env; i++) { | 2036 | for (i = 0; i < options.num_accept_env; i++) { |
2037 | if (match_pattern(name, options.accept_env[i])) { | 2037 | if (match_pattern(name, options.accept_env[i])) { |
2038 | debug2("Setting env %d: %s=%s", s->num_env, name, val); | 2038 | debug2("Setting env %d: %s=%s", s->num_env, name, val); |
2039 | s->env = xreallocarray(s->env, s->num_env + 1, | 2039 | s->env = xrecallocarray(s->env, s->num_env, |
2040 | sizeof(*s->env)); | 2040 | s->num_env + 1, sizeof(*s->env)); |
2041 | s->env[s->num_env].name = name; | 2041 | s->env[s->num_env].name = name; |
2042 | s->env[s->num_env].val = val; | 2042 | s->env[s->num_env].val = val; |
2043 | s->num_env++; | 2043 | s->num_env++; |