Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 69185 invoked from network); 20 May 2010 15:43:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 15:43:35 -0000 Received: (qmail 973 invoked by uid 500); 20 May 2010 15:43:35 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 941 invoked by uid 500); 20 May 2010 15:43:35 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 934 invoked by uid 99); 20 May 2010 15:43:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 15:43:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 15:43:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 456BF2388900; Thu, 20 May 2010 15:43:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r946675 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/decaf/internal/net/ssl/openssl/OpenSSLContextSpi.cpp test/decaf/net/ssl/SSLSocketFactoryTest.cpp Date: Thu, 20 May 2010 15:43:11 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100520154311.456BF2388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Thu May 20 15:43:10 2010 New Revision: 946675 URL: http://svn.apache.org/viewvc?rev=946675&view=rev Log: https://issues.apache.org/activemq/browse/AMQCPP-140 Fix memory leak in test Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLContextSpi.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ssl/SSLSocketFactoryTest.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLContextSpi.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLContextSpi.cpp?rev=946675&r1=946674&r2=946675&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLContextSpi.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLContextSpi.cpp Thu May 20 15:43:10 2010 @@ -40,7 +40,9 @@ #ifdef HAVE_OPENSSL #include +#include #include +#include #define SSL_LOCK_MUTEX CRYPTO_LOCK #else #define SSL_LOCK_MUTEX 1 @@ -169,7 +171,9 @@ void OpenSSLContextSpi::providerInit( Se #ifdef HAVE_OPENSSL // General library initialization. + #ifdef WIN32 CRYPTO_malloc_init(); + #endif SSL_load_error_strings(); SSL_library_init(); OpenSSL_add_all_algorithms(); Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ssl/SSLSocketFactoryTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ssl/SSLSocketFactoryTest.cpp?rev=946675&r1=946674&r2=946675&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ssl/SSLSocketFactoryTest.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/net/ssl/SSLSocketFactoryTest.cpp Thu May 20 15:43:10 2010 @@ -42,9 +42,8 @@ void SSLSocketFactoryTest::testGetDefaul #ifdef HAVE_OPENSSL - Socket* sock = factory->createSocket(); - CPPUNIT_ASSERT( sock != NULL ); - delete sock; + std::auto_ptr sock( factory->createSocket() ); + CPPUNIT_ASSERT( sock.get() != NULL ); #else