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:
ee9e399
)
libubus: check if subscriber cb is non-NULL before calling it
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 14 Dec 2012 20:27:52 +0000
(21:27 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 14 Dec 2012 20:27:52 +0000
(21:27 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
libubus-sub.c
patch
|
blob
|
history
diff --git
a/libubus-sub.c
b/libubus-sub.c
index 8ffb0180c3d91a9ac654c6d4c82bc95b35b711fe..167630c69b5b45fb0e6263214625019c5ee01444 100644
(file)
--- a/
libubus-sub.c
+++ b/
libubus-sub.c
@@
-21,7
+21,8
@@
static int ubus_subscriber_cb(struct ubus_context *ctx, struct ubus_object *obj,
struct ubus_subscriber *s;
s = container_of(obj, struct ubus_subscriber, obj);
- s->cb(ctx, obj, req, method, msg);
+ if (s->cb)
+ s->cb(ctx, obj, req, method, msg);
return 0;
}