- packet_send();
+ packet_length = packet_send();
c->remote_window -= dlen + 4;
- xfree(data);
+ free(data);
}
@@ -2043,7 +2082,7 @@ channel_output_poll(void)
SSH2_MSG_CHANNEL_DATA : SSH_MSG_CHANNEL_DATA);
+ if (c == NULL || (c->number != SSH_CIPHER_SSH2 &&
+c->number != SSH_CIPHER_NONE)) {
debug("bad cipher %s [%s]", p, names);
- xfree(cipher_list);
+ free(cipher_list);
return 0;
@@ -337,6 +339,7 @@ cipher_get_keyiv(CipherContext *cc, u_ch
int evplen;
+ pthread_join(c->tid[i], NULL);
+
+ memset(c, 0, sizeof(*c));
-+ xfree(c);
++ free(c);
+ EVP_CIPHER_CTX_set_app_data(ctx, NULL);
+ }
+ return (1);
@@ -931,19 +933,22 @@ packet_send2(void)
sizeof(Buffer));
TAILQ_REMOVE(&outgoing, p, next);
- xfree(p);
+ free(p);
- packet_send2_wrapped();
+ packet_length += packet_send2_wrapped();
}
- packet_write_poll();
+ bytes_sent += packet_write_poll();
}
- xfree(setp);
+ free(setp);
}
@@ -1736,12 +1744,24 @@ packet_send_ignore(int nbytes)
}
+
+ for (i = 0; i < options->num_local_forwards; i++) {
+ if (options->local_forwards[i].listen_host != NULL)
-+ xfree(options->local_forwards[i].listen_host);
-+ xfree(options->local_forwards[i].connect_host);
++ free(options->local_forwards[i].listen_host);
++ free(options->local_forwards[i].connect_host);
+ }
+ options->num_local_forwards = 0;
+ for (i = 0; i < options->num_remote_forwards; i++) {
+ if (options->remote_forwards[i].listen_host != NULL)
-+ xfree(options->remote_forwards[i].listen_host);
-+ xfree(options->remote_forwards[i].connect_host);
++ free(options->remote_forwards[i].listen_host);
++ free(options->remote_forwards[i].connect_host);
+ }
+ options->num_remote_forwards = 0;
+ options->tun_open = SSH_TUNMODE_NO;
+ i = 0; /* failure */
+ }
+
-+ xfree(p);
++ free(p);
+
+ if (dynamicfwd) {
+ if (!(i == 1 || i == 2))
+
+ fail_free:
+ if (fwd->connect_host != NULL) {
-+ xfree(fwd->connect_host);
++ free(fwd->connect_host);
+ fwd->connect_host = NULL;
+ }
+ if (fwd->listen_host != NULL) {
-+ xfree(fwd->listen_host);
++ free(fwd->listen_host);
+ fwd->listen_host = NULL;
+ }
+ return (0);
diff -NupwB openssh-5.2p1-canonical/servconf.c openssh-5.2p1-hpn13v6/servconf.c
--- openssh-5.2p1-canonical/servconf.c 2009-01-28 00:31:23.000000000 -0500
+++ openssh-5.2p1-hpn13v6/servconf.c 2009-05-14 12:36:10.000000000 -0400
-@@ -128,11 +128,20 @@ initialize_server_options(ServerOptions
+@@ -132,6 +132,10 @@
options->adm_forced_command = NULL;
options->chroot_directory = NULL;
options->zero_knowledge_password_authentication = -1;
+ options->tcp_rcv_buf_poll = -1;
+ options->hpn_disabled = -1;
+ options->hpn_buffer_size = -1;
- }
-
+ #ifdef WITH_LDAP_PUBKEY
+ /* XXX dirty */
+ options->lpk.ld = NULL;
+@@ -156,6 +160,11 @@
void
fill_default_server_options(ServerOptions *options)
{
line = xstrdup(optarg);
@@ -503,6 +500,13 @@ main(int ac, char **av)
exit(255);
- xfree(line);
+ free(line);
break;
+ case 'T':
+ no_tty_flag = 1;