summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2021-08-12 16:58:30 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2021-08-12 16:58:30 +0100
commit545c4955e6cba50d284c3ef98f1ee17c1366a9b4 (patch)
treec4c3252c266970efa0873643ce15802c90301087
parent2f2d59b35c3338ffa20361d409f07ef340987d1b (diff)
downloaddnsmasq-545c4955e6cba50d284c3ef98f1ee17c1366a9b4.tar.gz
Revert "Re-order UBus teardown logic."
This reverts commit d387f8f06c68b43d549388413d996bef63e4b9f6.
-rw-r--r--src/ubus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ubus.c b/src/ubus.c
index 6b1b7db..eb44eb4 100644
--- a/src/ubus.c
+++ b/src/ubus.c
@@ -81,12 +81,12 @@ static void ubus_subscribe_cb(struct ubus_context *ctx, struct ubus_object *obj)
static void ubus_destroy(struct ubus_context *ubus)
{
- ubus_free(ubus);
- daemon->ubus = NULL;
-
// Forces re-initialization when we're reusing the same definitions later on.
ubus_object.id = 0;
ubus_object_type.id = 0;
+
+ ubus_free(ubus);
+ daemon->ubus = NULL;
}
static void ubus_disconnect_cb(struct ubus_context *ubus)