[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.201 and 1.202

version 1.201, 2013/05/16 10:43:34 version 1.202, 2013/05/17 00:13:14
Line 302 
Line 302 
         int i;          int i;
   
         for (i = 0; i < options->num_local_forwards; i++) {          for (i = 0; i < options->num_local_forwards; i++) {
                 if (options->local_forwards[i].listen_host != NULL)                  free(options->local_forwards[i].listen_host);
                         xfree(options->local_forwards[i].listen_host);                  free(options->local_forwards[i].connect_host);
                 xfree(options->local_forwards[i].connect_host);  
         }          }
         if (options->num_local_forwards > 0) {          if (options->num_local_forwards > 0) {
                 xfree(options->local_forwards);                  free(options->local_forwards);
                 options->local_forwards = NULL;                  options->local_forwards = NULL;
         }          }
         options->num_local_forwards = 0;          options->num_local_forwards = 0;
         for (i = 0; i < options->num_remote_forwards; i++) {          for (i = 0; i < options->num_remote_forwards; i++) {
                 if (options->remote_forwards[i].listen_host != NULL)                  free(options->remote_forwards[i].listen_host);
                         xfree(options->remote_forwards[i].listen_host);                  free(options->remote_forwards[i].connect_host);
                 xfree(options->remote_forwards[i].connect_host);  
         }          }
         if (options->num_remote_forwards > 0) {          if (options->num_remote_forwards > 0) {
                 xfree(options->remote_forwards);                  free(options->remote_forwards);
                 options->remote_forwards = NULL;                  options->remote_forwards = NULL;
         }          }
         options->num_remote_forwards = 0;          options->num_remote_forwards = 0;
Line 1448 
Line 1446 
                 i = 0; /* failure */                  i = 0; /* failure */
         }          }
   
         xfree(p);          free(p);
   
         if (dynamicfwd) {          if (dynamicfwd) {
                 if (!(i == 1 || i == 2))                  if (!(i == 1 || i == 2))
Line 1474 
Line 1472 
         return (i);          return (i);
   
  fail_free:   fail_free:
         if (fwd->connect_host != NULL) {          free(fwd->connect_host);
                 xfree(fwd->connect_host);          fwd->connect_host = NULL;
                 fwd->connect_host = NULL;          free(fwd->listen_host);
         }          fwd->listen_host = NULL;
         if (fwd->listen_host != NULL) {  
                 xfree(fwd->listen_host);  
                 fwd->listen_host = NULL;  
         }  
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.201  
changed lines
  Added in v.1.202