send_packets: Avoid crashing on errors in sendto call.

If sendto() returned an error, pthread_cleanup_pop() was not called before
return, resulting in a segfault on my CentOS 5.x platform.

Next, I need to look into why sendto is failing on CentOS 5.x but not on other
platforms.