Fix some magic numbers and ensure pointers are set to NULL after free()
Merge pull request #9 from pratid/feature/snmp_broker

Fix some magic numbers and ensure pointers are set to NULL after free()