Update main.c

Improvement: malloc call in network_write_packet replaced with a second network_write_bytes call.