Set ctx->msgbuf.data to NULL during the call. If ctx->msgbuf is needed
during the call, a new buffer will be allocated. If not,
ctx->msgbuf.data is restored to the previous value afterwards
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This allows sharing a policy array across methods, but masking out
unused entries for individual methods.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
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>