version 1.287, 2017/05/31 08:09:45 |
version 1.288, 2017/05/31 09:15:42 |
|
|
return NULL; |
return NULL; |
debug2("%s: allocate (allocated %d max %d)", |
debug2("%s: allocate (allocated %d max %d)", |
__func__, sessions_nalloc, options.max_sessions); |
__func__, sessions_nalloc, options.max_sessions); |
tmp = xreallocarray(sessions, sessions_nalloc + 1, |
tmp = xrecallocarray(sessions, sessions_nalloc, |
sizeof(*sessions)); |
sessions_nalloc + 1, sizeof(*sessions)); |
if (tmp == NULL) { |
if (tmp == NULL) { |
error("%s: cannot allocate %d sessions", |
error("%s: cannot allocate %d sessions", |
__func__, sessions_nalloc + 1); |
__func__, sessions_nalloc + 1); |
|
|
for (i = 0; i < options.num_accept_env; i++) { |
for (i = 0; i < options.num_accept_env; i++) { |
if (match_pattern(name, options.accept_env[i])) { |
if (match_pattern(name, options.accept_env[i])) { |
debug2("Setting env %d: %s=%s", s->num_env, name, val); |
debug2("Setting env %d: %s=%s", s->num_env, name, val); |
s->env = xreallocarray(s->env, s->num_env + 1, |
s->env = xrecallocarray(s->env, s->num_env, |
sizeof(*s->env)); |
s->num_env + 1, sizeof(*s->env)); |
s->env[s->num_env].name = name; |
s->env[s->num_env].name = name; |
s->env[s->num_env].val = val; |
s->env[s->num_env].val = val; |
s->num_env++; |
s->num_env++; |