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

Diff for /src/usr.bin/ssh/match.c between version 1.27 and 1.28

version 1.27, 2008/06/10 23:06:19 version 1.28, 2013/05/17 00:13:13
Line 38 
Line 38 
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <ctype.h>  #include <ctype.h>
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
 #include "xmalloc.h"  #include "xmalloc.h"
Line 224 
Line 225 
   
         if ((ret = match_pattern(user, pat)) == 1)          if ((ret = match_pattern(user, pat)) == 1)
                 ret = match_host_and_ip(host, ipaddr, p);                  ret = match_host_and_ip(host, ipaddr, p);
         xfree(pat);          free(pat);
   
         return ret;          return ret;
 }  }
   
 /*  /*
  * Returns first item from client-list that is also supported by server-list,   * Returns first item from client-list that is also supported by server-list,
  * caller must xfree() returned string.   * caller must free the returned string.
  */   */
 #define MAX_PROP        40  #define MAX_PROP        40
 #define SEP     ","  #define SEP     ","
Line 262 
Line 263 
                                 if (next != NULL)                                  if (next != NULL)
                                         *next = (cp == NULL) ?                                          *next = (cp == NULL) ?
                                             strlen(c) : (u_int)(cp - c);                                              strlen(c) : (u_int)(cp - c);
                                 xfree(c);                                  free(c);
                                 xfree(s);                                  free(s);
                                 return ret;                                  return ret;
                         }                          }
                 }                  }
         }          }
         if (next != NULL)          if (next != NULL)
                 *next = strlen(c);                  *next = strlen(c);
         xfree(c);          free(c);
         xfree(s);          free(s);
         return NULL;          return NULL;
 }  }

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28