snmp_agent: Fix null pointer dereference
authorPavel Rochnyack <pavel2000@ngs.ru>
Thu, 13 Jul 2017 07:34:27 +0000 (14:34 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Thu, 13 Jul 2017 15:21:24 +0000 (22:21 +0700)
commit7778f852d4c40066c4c5c096d17ff890a656ad31
tree54e1867b57fc51dbd5d35a09d2c21ed53e5d6a53
parent177bd49069d5cd45a6a7b61269f6001b82ff8acc
snmp_agent: Fix null pointer dereference

As `table` field in `data_definition_t` is just backreference,
then `snmp_agent_free_data()` should not alter parent structure.

So, table columns unregistering and freeing has moved to new
`snmp_agent_free_table_columns()` function.

That also fixes null pointer dereference.

Closes: #2338.
src/snmp_agent.c