FreeBSD Bugzilla – Attachment 213856 Details for
Bug 245971
[patch sbin/dhclient] remove_protocol() can mangle linked list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against HEAD (rev 360336)
dhclient.patch (text/plain), 536 bytes, created by
joost
on 2020-04-27 14:29:38 UTC
(
hide
)
Description:
patch against HEAD (rev 360336)
Filename:
MIME Type:
Creator:
joost
Created:
2020-04-27 14:29:38 UTC
Size:
536 bytes
patch
obsolete
>Index: dispatch.c >=================================================================== >--- dispatch.c (revision 360336) >+++ dispatch.c (working copy) >@@ -474,13 +474,17 @@ > void > remove_protocol(struct protocol *proto) > { >- struct protocol *p, *next; >+ struct protocol *p, *q; > >- for (p = protocols; p; p = next) { >- next = p->next; >+ q = NULL; >+ for (p = protocols; p; p = p->next) { > if (p == proto) { >- protocols = p->next; >+ if (q) >+ q->next=p->next; >+ else >+ protocols = p->next; > free(p); >+ break > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245971
:
213856
|
213889