gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1637-gb97684d
Date: Wed, 03 Jul 2013 20:38:41 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  b97684dbca5d50358e82f72adb64f32b0c1fb702 (commit)
      from  b3573a49034a01ac81c3ad4041519ac36cb7e1b6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=b97684dbca5d50358e82f72adb64f32b0c1fb702


commit b97684dbca5d50358e82f72adb64f32b0c1fb702
Author: Bastiaan Jacques <address@hidden>
Date:   Wed Jul 3 22:05:18 2013 +0200

    Defer destruction of |ans| until we are finished with it.
    
    |saddr| points to a few bytes within the struct addrinfo identified
    with |ans|.

diff --git a/libbase/Socket.cpp b/libbase/Socket.cpp
index 49ad3fd..45587bd 100644
--- a/libbase/Socket.cpp
+++ b/libbase/Socket.cpp
@@ -234,7 +234,6 @@ Socket::connect(const std::string& hostname, 
boost::uint16_t port)
     saddr = it->ai_addr;
     const int addrlen = it->ai_addrlen;
 
-    freeaddrinfo(ans);          // free the response data
 #else
     struct sockaddr_in addr;
     std::memset(&addr, 0, sizeof(addr));
@@ -268,7 +267,11 @@ Socket::connect(const std::string& hostname, 
boost::uint16_t port)
 #endif
 
     // Attempt connection
-    if (::connect(_socket, saddr, addrlen) < 0) {
+    int ret = ::connect(_socket, saddr, addrlen);
+#ifdef HAVE_IPV6
+    freeaddrinfo(ans);          // free the response data
+#endif
+    if (ret < 0) {
         const int err = errno;
 #ifndef _WIN32
         if (err != EINPROGRESS) {

-----------------------------------------------------------------------

Summary of changes:
 libbase/Socket.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]