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

Diff for /src/usr.bin/ssh/ssh-keyscan.c between version 1.8 and 1.9

version 1.8, 2001/01/13 18:06:54 version 1.9, 2001/01/13 18:12:47
Line 94 
Line 94 
         if (filename) {          if (filename) {
                 lb->filename = filename;                  lb->filename = filename;
                 if (!(lb->stream = fopen(filename, "r"))) {                  if (!(lb->stream = fopen(filename, "r"))) {
                         free(lb);                          xfree(lb);
                         if (errfun)                          if (errfun)
                                 (*errfun) ("%s: %s\n", filename, strerror(errno));                                  (*errfun) ("%s: %s\n", filename, strerror(errno));
                         return (NULL);                          return (NULL);
Line 107 
Line 107 
         if (!(lb->buf = malloc(lb->size = LINEBUF_SIZE))) {          if (!(lb->buf = malloc(lb->size = LINEBUF_SIZE))) {
                 if (errfun)                  if (errfun)
                         (*errfun) ("linebuf (%s): malloc failed\n", lb->filename);                          (*errfun) ("linebuf (%s): malloc failed\n", lb->filename);
                 free(lb);                  xfree(lb);
                 return (NULL);                  return (NULL);
         }          }
         lb->errfun = errfun;          lb->errfun = errfun;
Line 119 
Line 119 
 Linebuf_free(Linebuf * lb)  Linebuf_free(Linebuf * lb)
 {  {
         fclose(lb->stream);          fclose(lb->stream);
         free(lb->buf);          xfree(lb->buf);
         free(lb);          xfree(lb);
 }  }
   
 static inline void  static inline void
Line 314 
Line 314 
         do {          do {
                 name = xstrsep(&namelist, ",");                  name = xstrsep(&namelist, ",");
                 if (!name) {                  if (!name) {
                         free(namebase);                          xfree(namebase);
                         return (-1);                          return (-1);
                 }                  }
         } while ((s = tcpconnect(name)) < 0);          } while ((s = tcpconnect(name)) < 0);
Line 347 
Line 347 
         close(s);          close(s);
         if (s >= maxfd || fdcon[s].c_status == CS_UNUSED)          if (s >= maxfd || fdcon[s].c_status == CS_UNUSED)
                 fatal("confree: attempt to free bad fdno %d", s);                  fatal("confree: attempt to free bad fdno %d", s);
         free(fdcon[s].c_namebase);          xfree(fdcon[s].c_namebase);
         free(fdcon[s].c_output_name);          xfree(fdcon[s].c_output_name);
         if (fdcon[s].c_status == CS_KEYS)          if (fdcon[s].c_status == CS_KEYS)
                 free(fdcon[s].c_data);                  xfree(fdcon[s].c_data);
         fdcon[s].c_status = CS_UNUSED;          fdcon[s].c_status = CS_UNUSED;
         TAILQ_REMOVE(&tq, &fdcon[s], c_link);          TAILQ_REMOVE(&tq, &fdcon[s], c_link);
         FD_CLR(s, &read_wait);          FD_CLR(s, &read_wait);
Line 374 
Line 374 
         char *iname, *oname;          char *iname, *oname;
   
         iname = xstrdup(c->c_namelist);          iname = xstrdup(c->c_namelist);
         oname = c->c_output_name;          oname = xstrdup(c->c_output_name);
         c->c_output_name = NULL;/* prevent it from being freed */  
         confree(s);          confree(s);
         ret = conalloc(iname, oname);          ret = conalloc(iname, oname);
         free(iname);          xfree(iname);
           xfree(oname);
         return (ret);          return (ret);
 }  }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9