Fixing pointer bugs in gnet and ospf