free(newpayload);
sfree(newpayload);
static void ssh2_pkt_send(void) {    int cipherblk, maclen, padding, i;    static unsigned long outgoing_sequence = 0;    /*     * Compress packet payload.     */#if 0    debug(("Pre-compression payload:\r\n"));    for (i = 5; i < pktout.length; i++)	debug(("  %02x", (unsigned char)pktout.data[i]));    debug(("\r\n"));#endif    {	unsigned char *newpayload;	int newlen;	if (cscomp && cscomp->compress(pktout.data+5, pktout.length-5,				       &newpayload, &newlen)) {	    pktout.length = 5;	    ssh2_pkt_adddata(newpayload, newlen);	    free(newpayload);	}    }    /*     * Add padding. At least four bytes, and must also bring total     * length (minus MAC) up to a multiple of the block size.     */    cipherblk = cipher ? cipher->blksize : 8;   /* block size */    cipherblk = cipherblk < 8 ? 8 : cipherblk;   /* or 8 if blksize < 8 */    padding = 4;    padding += (cipherblk - (pktout.length + padding) % cipherblk) % cipherblk;    pktout.data[4] = padding;    for (i = 0; i < padding; i++)        pktout.data[pktout.length + i] = random_byte();    PUT_32BIT(pktout.data, pktout.length + padding - 4);    if (csmac)        csmac->generate(pktout.data, pktout.length + padding,                        outgoing_sequence);    outgoing_sequence++;               /* whether or not we MACed */#if 0    debug(("Sending packet len=%d\r\n", pktout.length+padding));    for (i = 0; i < pktout.length+padding; i++)        debug(("  %02x", (unsigned char)pktout.data[i]));    debug(("\r\n"));#endif    if (cscipher)        cscipher->encrypt(pktout.data, pktout.length + padding);    maclen = csmac ? csmac->len : 0;    sk_write(s, pktout.data, pktout.length + padding + maclen);}