When process unsubscribes then remove callback is called. But it
can be NULL if not defined, so we should check it before we call it.
Signed-off-by: Lukasz Baj <l.baj@radytek.com>
return;
s = container_of(obj, struct ubus_subscriber, obj);
return;
s = container_of(obj, struct ubus_subscriber, obj);
- s->remove_cb(ctx, s, blob_get_u32(attrbuf[UBUS_ATTR_TARGET]));
+ if (s->remove_cb)
+ s->remove_cb(ctx, s, blob_get_u32(attrbuf[UBUS_ATTR_TARGET]));