projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c9810b
)
config: use list safe iterator in lease_delete
author
Hans Dedecker
<dedeckeh@gmail.com>
Tue, 14 May 2019 13:18:08 +0000
(15:18 +0200)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Tue, 14 May 2019 13:22:02 +0000
(15:22 +0200)
As the current assignment is freed in lease_delete use list_for_each_entry_safe
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/config.c
patch
|
blob
|
history
diff --git
a/src/config.c
b/src/config.c
index f1fe82b3312ac7cf2adf3747959e4f7788a06447..40f18a4b27371f538ccd884d7cb07d505bf88734 100644
(file)
--- a/
src/config.c
+++ b/
src/config.c
@@
-881,9
+881,9
@@
static void lease_change_config(struct lease *l_old, struct lease *l_new)
static void lease_delete(struct lease *l)
{
- struct dhcp_assignment *a;
+ struct dhcp_assignment *a
, *tmp
;
- list_for_each_entry
(a
, &l->assignments, lease_list)
+ list_for_each_entry
_safe(a, tmp
, &l->assignments, lease_list)
free_assignment(a);
free_lease(l);