[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] engine/dataflow http.cpp,1.37.8.1,1.37.8.2
From:       dcollins () helixcommunity ! org
Date:       2013-09-24 22:10:49
[Download RAW message or body]

Update of /cvsroot/server/engine/dataflow
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv10993

Modified Files:
      Tag: SERVER_NUCLEUS
	http.cpp 
Log Message:
Synopsis
========
Fixes memory leaks related to RPD-2413 (continuous playback leak)

Branches:  SERVER_NUCLEUS
Reviewer:  Jamie


Description
===========
This fixes several memory leaks that repro'd when doing HLS playback 
from RPDS to the iOS client.

With a debug build, I was triggering a CA when uploading.  The http.cpp 
change fixes this.  This was not CAing with a release build for some
reason.


Files Affected
==============
server_rn/nucleus/fs/transfs/transfob.cpp
server_rn/nucleus/fs/transfs/transprocs.cpp
server_rn/nucleus/fs/transfs/tsrequesthandler.cpp
server_rn/nucleus/fs/webapi/mediainfo.cpp
server/engine/dataflow/http.cpp


Testing Performed
=================
Unit Tests:
- None

Integration Tests:
- Enabled leak-checking while performing HLS playback.

Leak Tests:
- None

Performance Tests:
- None

Platforms Tested:  Windows 7 / x86 (Debug)
Builds Verified:  VC10 / x86 / Debug


QA Hints
========
N/A



Index: http.cpp
===================================================================
RCS file: /cvsroot/server/engine/dataflow/http.cpp,v
retrieving revision 1.37.8.1
retrieving revision 1.37.8.2
diff -u -d -r1.37.8.1 -r1.37.8.2
--- http.cpp	25 Apr 2013 19:21:56 -0000	1.37.8.1
+++ http.cpp	24 Sep 2013 22:10:41 -0000	1.37.8.2
@@ -679,9 +679,16 @@
             m_pPostHandler->PostData(m_pPostDataBuffer);
             HX_RELEASE(m_pPostDataBuffer);
         }
+
+        // We can get deleted inside of PostData, so we can't safely
+        // release m_pPostHandler after calling it.  Give the refcount
+        // to pPostHandler.
+        IHXPostDataHandler* pPostHandler = m_pPostHandler;
+        m_pPostHandler = NULL;
+
         // Signal handle - no more data
-        m_pPostHandler->PostData(NULL);
-        HX_RELEASE(m_pPostHandler);
+        pPostHandler->PostData(NULL);
+        HX_RELEASE(pPostHandler);
     }
     else
     {


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic