[BACK]Return to readconf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/readconf.c between version 1.366 and 1.367

version 1.366, 2022/02/08 08:59:12 version 1.367, 2022/04/20 15:56:49
Line 740 
Line 740 
 rm_env(Options *options, const char *arg, const char *filename, int linenum)  rm_env(Options *options, const char *arg, const char *filename, int linenum)
 {  {
         int i, j, onum_send_env = options->num_send_env;          int i, j, onum_send_env = options->num_send_env;
         char *cp;  
   
         /* Remove an environment variable */          /* Remove an environment variable */
         for (i = 0; i < options->num_send_env; ) {          for (i = 0; i < options->num_send_env; ) {
                 cp = xstrdup(options->send_env[i]);                  if (!match_pattern(options->send_env[i], arg + 1)) {
                 if (!match_pattern(cp, arg + 1)) {  
                         free(cp);  
                         i++;                          i++;
                         continue;                          continue;
                 }                  }
                 debug3("%s line %d: removing environment %s",                  debug3("%s line %d: removing environment %s",
                     filename, linenum, cp);                      filename, linenum, options->send_env[i]);
                 free(cp);  
                 free(options->send_env[i]);                  free(options->send_env[i]);
                 options->send_env[i] = NULL;                  options->send_env[i] = NULL;
                 for (j = i; j < options->num_send_env - 1; j++) {                  for (j = i; j < options->num_send_env - 1; j++) {

Legend:
Removed from v.1.366  
changed lines
  Added in v.1.367