[Pkg-privacy-commits] [obfs4proxy] 09/14: Fix other instances of attempting to close `nil` on handshake failure.
Ximin Luo
infinity0 at debian.org
Sat Feb 20 22:34:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfs4proxy.
commit 2cbefcfcd23d457cff742e4941cb705604d53ce5
Author: Yawning Angel <yawning at torproject.org>
Date: Mon Jan 25 12:16:15 2016 +0000
Fix other instances of attempting to close `nil` on handshake failure.
Bug introduced in e52258edac55d82ff153755493d770bfbbc9a346, not in any
released version of obfs4proxy.
---
transports/obfs2/obfs2.go | 3 ++-
transports/obfs3/obfs3.go | 3 ++-
transports/scramblesuit/base.go | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/transports/obfs2/obfs2.go b/transports/obfs2/obfs2.go
index a926141..8fa6cb8 100644
--- a/transports/obfs2/obfs2.go
+++ b/transports/obfs2/obfs2.go
@@ -113,8 +113,9 @@ func (cf *obfs2ClientFactory) Dial(network, addr string, dialFn base.DialFunc, a
if err != nil {
return nil, err
}
+ dialConn := conn
if conn, err = newObfs2ClientConn(conn); err != nil {
- conn.Close()
+ dialConn.Close()
return nil, err
}
return conn, nil
diff --git a/transports/obfs3/obfs3.go b/transports/obfs3/obfs3.go
index e4c3ba6..08d6be4 100644
--- a/transports/obfs3/obfs3.go
+++ b/transports/obfs3/obfs3.go
@@ -97,8 +97,9 @@ func (cf *obfs3ClientFactory) Dial(network, addr string, dialFn base.DialFunc, a
if err != nil {
return nil, err
}
+ dialConn := conn
if conn, err = newObfs3ClientConn(conn); err != nil {
- conn.Close()
+ dialConn.Close()
return nil, err
}
return conn, nil
diff --git a/transports/scramblesuit/base.go b/transports/scramblesuit/base.go
index 223d085..7a71398 100644
--- a/transports/scramblesuit/base.go
+++ b/transports/scramblesuit/base.go
@@ -87,8 +87,9 @@ func (cf *ssClientFactory) Dial(network, addr string, dialFn base.DialFunc, args
if err != nil {
return nil, err
}
+ dialConn := conn
if conn, err = newScrambleSuitClientConn(conn, cf.ticketStore, ca); err != nil {
- conn.Close()
+ dialConn.Close()
return nil, err
}
return conn, nil
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git
More information about the Pkg-privacy-commits
mailing list