Segmentation fault for SNMP query