Deallocating memory used for segment in sender.c