When ubus invokes proto_dump_handlers, and a struct proto_handler has
been added with a NULL config_params, a segmentation fault occurs.
Avoid this segmentation fault by checking for a NULL config_params
before further access.
Signed-off-by: Olof Sivertsson <olof.sivertsson@zenterio.com>
void *v;
c = blobmsg_open_table(b, p->name);
- if (p->config_params->validate) {
+ if (p->config_params && p->config_params->validate) {
int i;
v = blobmsg_open_table(b, "validate");