summaryrefslogtreecommitdiffhomepage
path: root/cli-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2016-11-18 23:56:22 +0800
committerGitHub <noreply@github.com>2016-11-18 23:56:22 +0800
commit9f674382d55cb3b8effcb53cf8d7c2d368675f3d (patch)
tree69682ee5349807e7a9f9a5276b85e4dc76586548 /cli-tcpfwd.c
parent6830a65923efc536a19c36cd1c362120b9d0d929 (diff)
parent0d9c3fe70b828ff4af3a7b9fa20a169afa1a1fae (diff)
Merge pull request #27 from fperrad/20160325_lint
more linting
Diffstat (limited to 'cli-tcpfwd.c')
-rw-r--r--cli-tcpfwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli-tcpfwd.c b/cli-tcpfwd.c
index 95b2d7c..78f61f7 100644
--- a/cli-tcpfwd.c
+++ b/cli-tcpfwd.c
@@ -234,7 +234,7 @@ static int newtcpforwarded(struct Channel * channel) {
char *origaddr = NULL;
unsigned int origport;
m_list_elem * iter = NULL;
- struct TCPFwdEntry *fwd;
+ struct TCPFwdEntry *fwd = NULL;
char portstring[NI_MAXSERV];
int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
@@ -265,7 +265,7 @@ static int newtcpforwarded(struct Channel * channel) {
}
- if (iter == NULL) {
+ if (iter == NULL || fwd == NULL) {
/* We didn't request forwarding on that port */
cleantext(origaddr);
dropbear_log(LOG_INFO, "Server sent unrequested forward from \"%s:%d\"",