int len = ssh2_pkt_construct(ssh, pkt); if (ssh->deferred_len + len > ssh->deferred_size) { ssh->deferred_size = ssh->deferred_len + len + 128; ssh->deferred_send_data = sresize(ssh->deferred_send_data, ssh->deferred_size, unsigned char); } memcpy(ssh->deferred_send_data + ssh->deferred_len, pkt->data, len); ssh->deferred_len += len; ssh_free_packet(pkt);
if (ssh->queueing) ssh2_pkt_queue(ssh, pkt); else ssh2_pkt_defer_noqueue(ssh, pkt);
static void ssh2_pkt_defer(Ssh ssh, struct Packet *pkt){    int len = ssh2_pkt_construct(ssh, pkt);    if (ssh->deferred_len + len > ssh->deferred_size) {	ssh->deferred_size = ssh->deferred_len + len + 128;	ssh->deferred_send_data = sresize(ssh->deferred_send_data,					  ssh->deferred_size,					  unsigned char);    }    memcpy(ssh->deferred_send_data + ssh->deferred_len, pkt->data, len);    ssh->deferred_len += len;    ssh_free_packet(pkt);}