FreeBSD Bugzilla – Attachment 213889 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)
file_245971.txt (text/plain), 731 bytes, created by
joost
on 2020-04-28 15:16:20 UTC
(
hide
)
Description:
patch against HEAD (rev 360336)
Filename:
MIME Type:
Creator:
joost
Created:
2020-04-28 15:16:20 UTC
Size:
731 bytes
patch
obsolete
>--- dispatch.c (revision 360336) >+++ dispatch.c (working copy) >@@ -474,14 +474,19 @@ > 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; > } >+ q = p; > } > } >
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