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

Diff for /src/usr.bin/ssh/ssh-agent.c between version 1.39 and 1.40

version 1.39, 2000/11/12 19:50:38 version 1.40, 2000/11/14 23:48:55
Line 304 
Line 304 
                         /*                          /*
                          * We have this key.  Free the old key.  Since we                           * We have this key.  Free the old key.  Since we
                          * don\'t want to leave empty slots in the middle of                           * don\'t want to leave empty slots in the middle of
                          * the array, we actually free the key there and copy                           * the array, we actually free the key there and move
                          * data from the last entry.                           * all the entries between the empty slot and the end
                            * of the array.
                          */                           */
                         Idtab *tab = idtab_lookup(version);                          Idtab *tab = idtab_lookup(version);
                         key_free(tab->identities[idx].key);                          key_free(tab->identities[idx].key);
Line 314 
Line 315 
                                 fatal("process_remove_identity: "                                  fatal("process_remove_identity: "
                                     "internal error: tab->nentries %d",                                      "internal error: tab->nentries %d",
                                     tab->nentries);                                      tab->nentries);
                         if (idx != tab->nentries - 1)                          if (idx != tab->nentries - 1) {
                                 tab->identities[idx] = tab->identities[tab->nentries - 1];                                  int i;
                                   for (i = idx; i < tab->nentries - 1; i++)
                                           tab->identities[i] = tab->identities[i+1];
                           }
                           tab->identities[tab->nentries - 1].key = NULL;
                           tab->identities[tab->nentries - 1].comment = NULL;
                         tab->nentries--;                          tab->nentries--;
                         success = 1;                          success = 1;
                 }                  }

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40