summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-02 07:31:17 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-06-02 07:31:17 +1000
commita627d42e51ffa71e014d7b2d2c07118122fd3ec3 (patch)
tree7bda769de81f509e28d800916fa20abd37906d79 /packet.c
parentc7aad0058c957afeb26a3f703e8cb0eddeb62365 (diff)
- djm@cvs.openbsd.org 2013/05/17 00:13:13
[xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c dns.c packet.c readpass.c authfd.c moduli.c] bye, bye xfree(); ok markus@
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/packet.c b/packet.c
index a64bbae3c..84ebd81d5 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.185 2013/05/16 04:09:13 dtucker Exp $ */ 1/* $OpenBSD: packet.c,v 1.186 2013/05/17 00:13:13 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -766,13 +766,13 @@ set_newkeys(int mode)
766 memset(enc->iv, 0, enc->iv_len); 766 memset(enc->iv, 0, enc->iv_len);
767 memset(enc->key, 0, enc->key_len); 767 memset(enc->key, 0, enc->key_len);
768 memset(mac->key, 0, mac->key_len); 768 memset(mac->key, 0, mac->key_len);
769 xfree(enc->name); 769 free(enc->name);
770 xfree(enc->iv); 770 free(enc->iv);
771 xfree(enc->key); 771 free(enc->key);
772 xfree(mac->name); 772 free(mac->name);
773 xfree(mac->key); 773 free(mac->key);
774 xfree(comp->name); 774 free(comp->name);
775 xfree(active_state->newkeys[mode]); 775 free(active_state->newkeys[mode]);
776 } 776 }
777 active_state->newkeys[mode] = kex_get_newkeys(mode); 777 active_state->newkeys[mode] = kex_get_newkeys(mode);
778 if (active_state->newkeys[mode] == NULL) 778 if (active_state->newkeys[mode] == NULL)
@@ -1023,7 +1023,7 @@ packet_send2(void)
1023 memcpy(&active_state->outgoing_packet, &p->payload, 1023 memcpy(&active_state->outgoing_packet, &p->payload,
1024 sizeof(Buffer)); 1024 sizeof(Buffer));
1025 TAILQ_REMOVE(&active_state->outgoing, p, next); 1025 TAILQ_REMOVE(&active_state->outgoing, p, next);
1026 xfree(p); 1026 free(p);
1027 packet_send2_wrapped(); 1027 packet_send2_wrapped();
1028 } 1028 }
1029 } 1029 }
@@ -1073,7 +1073,7 @@ packet_read_seqnr(u_int32_t *seqnr_p)
1073 packet_check_eom(); 1073 packet_check_eom();
1074 /* If we got a packet, return it. */ 1074 /* If we got a packet, return it. */
1075 if (type != SSH_MSG_NONE) { 1075 if (type != SSH_MSG_NONE) {
1076 xfree(setp); 1076 free(setp);
1077 return type; 1077 return type;
1078 } 1078 }
1079 /* 1079 /*
@@ -1460,9 +1460,9 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1460 packet_get_char(); 1460 packet_get_char();
1461 msg = packet_get_string(NULL); 1461 msg = packet_get_string(NULL);
1462 debug("Remote: %.900s", msg); 1462 debug("Remote: %.900s", msg);
1463 xfree(msg); 1463 free(msg);
1464 msg = packet_get_string(NULL); 1464 msg = packet_get_string(NULL);
1465 xfree(msg); 1465 free(msg);
1466 break; 1466 break;
1467 case SSH2_MSG_DISCONNECT: 1467 case SSH2_MSG_DISCONNECT:
1468 reason = packet_get_int(); 1468 reason = packet_get_int();
@@ -1473,7 +1473,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1473 SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR, 1473 SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
1474 "Received disconnect from %s: %u: %.400s", 1474 "Received disconnect from %s: %u: %.400s",
1475 get_remote_ipaddr(), reason, msg); 1475 get_remote_ipaddr(), reason, msg);
1476 xfree(msg); 1476 free(msg);
1477 cleanup_exit(255); 1477 cleanup_exit(255);
1478 break; 1478 break;
1479 case SSH2_MSG_UNIMPLEMENTED: 1479 case SSH2_MSG_UNIMPLEMENTED:
@@ -1492,7 +1492,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1492 case SSH_MSG_DEBUG: 1492 case SSH_MSG_DEBUG:
1493 msg = packet_get_string(NULL); 1493 msg = packet_get_string(NULL);
1494 debug("Remote: %.900s", msg); 1494 debug("Remote: %.900s", msg);
1495 xfree(msg); 1495 free(msg);
1496 break; 1496 break;
1497 case SSH_MSG_DISCONNECT: 1497 case SSH_MSG_DISCONNECT:
1498 msg = packet_get_string(NULL); 1498 msg = packet_get_string(NULL);
@@ -1780,7 +1780,7 @@ packet_write_wait(void)
1780 } 1780 }
1781 packet_write_poll(); 1781 packet_write_poll();
1782 } 1782 }
1783 xfree(setp); 1783 free(setp);
1784} 1784}
1785 1785
1786/* Returns true if there is buffered data to write to the connection. */ 1786/* Returns true if there is buffered data to write to the connection. */