diff options
Diffstat (limited to 'sbin/dhclient/dispatch.c')
-rw-r--r-- | sbin/dhclient/dispatch.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 3317ceb..d493717 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -453,16 +453,12 @@ add_protocol(char *name, int fd, void (*handler)(struct protocol *), void remove_protocol(struct protocol *proto) { - struct protocol *p, *next, *prev; + struct protocol *p, *next; - prev = NULL; for (p = protocols; p; p = next) { next = p->next; if (p == proto) { - if (prev) - prev->next = p->next; - else - protocols = p->next; + protocols = p->next; free(p); } } |