Working find get_gateway on linux
cleaning up a couple of valgrind warnings