config.c: Fix potential memory corruption after [section](+).
authorRichard Mudgett <rmudgett@digium.com>
Mon, 12 Oct 2015 16:20:29 +0000 (11:20 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 12 Oct 2015 20:11:39 +0000 (15:11 -0500)
commit9951255775a28e28632c1ec7f4b24e021d3b59c6
tree52e9cda74237720dc120f44853e64854a72ffc69
parentc1ed11ee313af9f099049fc4c99bda989c93d3ff
config.c: Fix potential memory corruption after [section](+).

The memory corruption could happen if the [section](+) is the last section
in the file with trailing comments.  In this case process_text_line() has
left *last_cat is set to newcat and newcat is destroyed.

Change-Id: I0d1d999f553986f591becd000e7cc6ddfb978d93
main/config.c