diff options
author | James Meyer <james.meyer@operamail.com> | 2012-08-07 19:55:12 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-08-07 19:55:12 (GMT) |
commit | e68f87191d2765c3686883b4763ba811e6826ec8 (patch) | |
tree | a2c177c6c78f3b3360d2bd784b68d70c7daff9a0 /abs/extra/libffado/fix-segfault-on-close.patch | |
parent | 4033f4c0e684ce557ef8dec6267e6e27381406ff (diff) | |
download | linhes_pkgbuild-e68f87191d2765c3686883b4763ba811e6826ec8.zip linhes_pkgbuild-e68f87191d2765c3686883b4763ba811e6826ec8.tar.gz linhes_pkgbuild-e68f87191d2765c3686883b4763ba811e6826ec8.tar.bz2 |
libffado 2.0.1
Diffstat (limited to 'abs/extra/libffado/fix-segfault-on-close.patch')
-rw-r--r-- | abs/extra/libffado/fix-segfault-on-close.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/abs/extra/libffado/fix-segfault-on-close.patch b/abs/extra/libffado/fix-segfault-on-close.patch new file mode 100644 index 0000000..c81b97e --- /dev/null +++ b/abs/extra/libffado/fix-segfault-on-close.patch @@ -0,0 +1,64 @@ +Index: /trunk/libffado/src/debugmodule/debugmodule.h
+===================================================================
+--- /trunk/libffado/src/debugmodule/debugmodule.h (revision 1763)
++++ /trunk/libffado/src/debugmodule/debugmodule.h (revision 1999)
+@@ -283,6 +283,10 @@
+ void hexDumpQuadlets( quadlet_t *data_start, unsigned int length );
+
++class DebugModuleManager;
++
+ class DebugModule {
+ public:
++ friend class DebugModuleManager;
++
+ enum {
+ eDL_Message = DEBUG_LEVEL_MESSAGE,
+@@ -333,4 +337,5 @@
+ std::string m_name;
+ debug_level_t m_level;
++ DebugModuleManager* m_manager;
+ };
+
+Index: /trunk/libffado/src/debugmodule/debugmodule.cpp
+===================================================================
+--- /trunk/libffado/src/debugmodule/debugmodule.cpp (revision 1763)
++++ /trunk/libffado/src/debugmodule/debugmodule.cpp (revision 1999)
+@@ -84,5 +84,6 @@
+ // << endl;
+ // }
+- if ( !DebugModuleManager::instance()->unregisterModule( *this ) ) {
++
++ if (m_manager && !m_manager->unregisterModule( *this ) ) {
+ cerr << "Could not unregister DebugModule at DebugModuleManager"
+ << endl;
+@@ -263,12 +264,9 @@
+ DebugModuleManager::~DebugModuleManager()
+ {
+- // cleanin up leftover modules
+- for ( DebugModuleVectorIterator it = m_debugModules.begin();
+- it != m_debugModules.end();
+- ++it )
++ // cleaning up leftover modules
++ while (!m_debugModules.empty())
+ {
+- fprintf(stderr,"Cleaning up leftover debug module: %s\n",(*it)->getName().c_str());
+- m_debugModules.erase( it );
+- delete *it;
++ DebugModule *mod = m_debugModules.back();
++ unregisterModule(*mod);
+ }
+
+@@ -455,4 +453,6 @@
+ } else {
+ m_debugModules.push_back( &debugModule );
++ if (debugModule.m_manager == NULL)
++ debugModule.m_manager = this;
+ }
+ return true;
+@@ -469,4 +469,6 @@
+ if ( *it == &debugModule ) {
+ m_debugModules.erase( it );
++ if (debugModule.m_manager == this)
++ debugModule.m_manager = NULL;
+ return true;
+ }
|