View | Details | Raw Unified | Return to bug 245971 | Differences between
and this patch

Collapse All | Expand All

(-)dispatch.c (working copy) (-4 / +9 lines)
Lines 474-487 Link Here
474
void
474
void
475
remove_protocol(struct protocol *proto)
475
remove_protocol(struct protocol *proto)
476
{
476
{
477
       struct protocol *p, *next;
477
       struct protocol *p, *q;
478
478
479
       for (p = protocols; p; p = next) {
479
       q = NULL;
480
               next = p->next;
480
       for (p = protocols; p; p = p->next) {
481
               if (p == proto) {
481
               if (p == proto) {
482
                       protocols = p->next;
482
                       if (q) 
483
                               q->next=p->next;
484
                       else
485
                               protocols = p->next;
483
                       free(p);
486
                       free(p);
487
                       break;
484
               }
488
               }
489
               q = p;
485
       }
490
       }
486
}
491
}
487
492

Return to bug 245971