sfree(pktin);
sftp_pkt_free(pktin);
int fxp_read(struct fxp_handle *handle, char *buffer, uint64 offset,	     int len){    struct sftp_packet *pktin, *pktout;    int id;    pktout = sftp_pkt_init(SSH_FXP_READ);    sftp_pkt_adduint32(pktout, 0xBCD); /* request id */    sftp_pkt_addstring_start(pktout);    sftp_pkt_addstring_data(pktout, handle->hstring, handle->hlen);    sftp_pkt_adduint64(pktout, offset);    sftp_pkt_adduint32(pktout, len);    sftp_send(pktout);    pktin = sftp_recv();    if (!pktin) {	fxp_internal_error("did not receive a valid SFTP packet\n");	return -1;    }    id = sftp_pkt_getuint32(pktin);    if (id != 0xBCD) {	fxp_internal_error("request ID mismatch");	return -1;    }    if (pktin->type == SSH_FXP_DATA) {	char *str;	int rlen;	sftp_pkt_getstring(pktin, &str, &rlen);	if (rlen > len || rlen < 0) {	    fxp_internal_error("READ returned more bytes than requested");	    return -1;	}	memcpy(buffer, str, rlen);	sfree(pktin);	return rlen;    } else {	fxp_got_status(pktin);	return -1;    }}