aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-01-26 14:21:46 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-26 14:21:46 +0100
commit9b694f396c4d391f27802eba0cc3f708959324b1 (patch)
tree362c9ea9469a75c1cc652fc05a5ff9190a996827 /src
parentd41042f92d17d8a0ae6ad3b79ea3f8f8ff791cfc (diff)
downloadlibssh-9b694f396c4d391f27802eba0cc3f708959324b1.tar.gz
libssh-9b694f396c4d391f27802eba0cc3f708959324b1.tar.xz
libssh-9b694f396c4d391f27802eba0cc3f708959324b1.zip
packet: Add missing error check in packet_send2()
Found by csbuild. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/packet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/packet.c b/src/packet.c
index 39ecf362..1181ca7d 100644
--- a/src/packet.c
+++ b/src/packet.c
@@ -1606,6 +1606,9 @@ static int packet_send2(ssh_session session)
}
rc = ssh_packet_write(session);
+ if (rc == SSH_ERROR) {
+ goto error;
+ }
session->send_seq++;
if (crypto != NULL) {
struct ssh_cipher_struct *cipher = NULL;