projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e443a04
)
only free unused devices after the final config init
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 6 Oct 2011 16:05:59 +0000
(18:05 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 6 Oct 2011 16:07:08 +0000
(18:07 +0200)
config.c
patch
|
blob
|
history
device.c
patch
|
blob
|
history
diff --git
a/config.c
b/config.c
index 23902ff42b2cddfc92a26eac0d332f362ee98bd8..6f8d3b7c50876b30245cc97db2c01b8431380f65 100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-341,10
+341,10
@@
config_init_interfaces(const char *name)
if (!strcmp(s->type, "interface"))
config_parse_interface(s);
}
- device_free_unused(NULL);
config_init = false;
device_reset_old();
device_init_pending();
+ device_free_unused(NULL);
interface_start_pending();
}
diff --git
a/device.c
b/device.c
index bceba62cd40573e2f364d90fbf8fa936d9b025be..5b27ce0f5c3693616b7bf23c4123c01f427cec40 100644
(file)
--- a/
device.c
+++ b/
device.c
@@
-292,7
+292,7
@@
void device_add_user(struct device_user *dep, struct device *dev)
static void
__device_free_unused(struct device *dev)
{
- if (!list_empty(&dev->users) || dev->current_config)
+ if (!list_empty(&dev->users) || dev->current_config
|| config_init
)
return;
device_free(dev);