mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-19 06:22:24 +01:00
Remove dead code in dhclient(8)
The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
This commit is contained in:
parent
640b69be3a
commit
4a8c3cd0df
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311298
@ -454,16 +454,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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user