summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/dhclient/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sbin/dhclient/dispatch.c')
-rw-r--r--freebsd/sbin/dhclient/dispatch.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/freebsd/sbin/dhclient/dispatch.c b/freebsd/sbin/dhclient/dispatch.c
index d37c9925..c0eee929 100644
--- a/freebsd/sbin/dhclient/dispatch.c
+++ b/freebsd/sbin/dhclient/dispatch.c
@@ -456,16 +456,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);
}
}