libubus: check if subscriber cb is non-NULL before calling it

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2012-12-14 21:27:52 +01:00
parent ee9e399096
commit e9431842e2

View file

@ -21,6 +21,7 @@ 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);
if (s->cb)
s->cb(ctx, obj, req, method, msg);
return 0;
}