diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-07-16 03:09:13 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-16 13:12:20 +1000 |
commit | de2997a4cf22ca0a524f0e5b451693c583e2fd89 (patch) | |
tree | a536783a94032178e4b15a7a14c5169e3cef9364 /packet.c | |
parent | 61cc0003eb37fa07603c969c12b7c795caa498f3 (diff) |
upstream: memleaks; found by valgrind
OpenBSD-Commit-ID: 6c3ba22be53e753c899545f771e8399fc93cd844
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.c,v 1.276 2018/07/09 21:03:30 markus Exp $ */ | 1 | /* $OpenBSD: packet.c,v 1.277 2018/07/16 03:09: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 |
@@ -622,6 +622,8 @@ ssh_packet_close_internal(struct ssh *ssh, int do_close) | |||
622 | cipher_free(state->receive_context); | 622 | cipher_free(state->receive_context); |
623 | state->send_context = state->receive_context = NULL; | 623 | state->send_context = state->receive_context = NULL; |
624 | if (do_close) { | 624 | if (do_close) { |
625 | free(ssh->local_ipaddr); | ||
626 | ssh->local_ipaddr = NULL; | ||
625 | free(ssh->remote_ipaddr); | 627 | free(ssh->remote_ipaddr); |
626 | ssh->remote_ipaddr = NULL; | 628 | ssh->remote_ipaddr = NULL; |
627 | free(ssh->state); | 629 | free(ssh->state); |