X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=libubus-obj.c;h=9261b83246f26ea83167659970f71f504fa2df24;hb=6d1ea6c33d321e4840b05986b6ce8e214bd1ba3a;hp=a9972c5862eae0d62469e3010c346ed378877d12;hpb=9c13096b169759eabf4c528df22d605e2d6093f4;p=project%2Fubus.git diff --git a/libubus-obj.c b/libubus-obj.c index a9972c5..9261b83 100644 --- a/libubus-obj.c +++ b/libubus-obj.c @@ -237,12 +237,12 @@ static void ubus_remove_object_cb(struct ubus_request *req, int type, struct blo if (!attrbuf[UBUS_ATTR_OBJID]) return; + avl_delete(&req->ctx->objects, &obj->avl); + obj->id = 0; if (attrbuf[UBUS_ATTR_OBJTYPE] && obj->type) obj->type->id = 0; - - avl_delete(&req->ctx->objects, &obj->avl); } int ubus_remove_object(struct ubus_context *ctx, struct ubus_object *obj)