proto: allow dumping protocol handlers without config_params
authorOlof Sivertsson <osivertsson@gmail.com>
Wed, 3 Jan 2018 09:35:13 +0000 (10:35 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Wed, 3 Jan 2018 15:57:43 +0000 (16:57 +0100)
commitfd5c399c01ceb1bbede3ae8b0e1daaa7652a6fa1
tree43284fc76e287fa992d3af5a8dd9e82c4056ad94
parent4268193c90bdd1532ee0555dd109a43eb8524b04
proto: allow dumping protocol handlers without config_params

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>
proto.c