projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47b38c9
)
libubus: fix crash on reconnect with objects that have no type
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 4 Apr 2013 20:03:03 +0000
(22:03 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 4 Apr 2013 20:03:24 +0000
(22:03 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
libubus-io.c
patch
|
blob
|
history
diff --git
a/libubus-io.c
b/libubus-io.c
index 0e7f25f2908be9e353e444e1d555db499e791fe8..ca5fdaf9bd7d661e23fcef2bebf702e1774a02ed 100644
(file)
--- a/
libubus-io.c
+++ b/
libubus-io.c
@@
-190,7
+190,8
@@
ubus_refresh_state(struct ubus_context *ctx)
/* clear all type IDs, they need to be registered again */
avl_for_each_element(&ctx->objects, obj, avl)
- obj->type->id = 0;
+ if (obj->type)
+ obj->type->id = 0;
/* push out all objects again */
avl_for_each_element_safe(&ctx->objects, obj, avl, tmp) {