tng         2002/12/02 11:16:38

  Modified:    c/src/xercesc/util/Platforms/IRIX IRIXPlatformUtils.cpp
  Log:
  [Bug 14723] Memory leak in atomicOpsMutex.  Patch from Adam Zell.
  
  Revision  Changes    Path
  1.5       +12 -2     
xml-xerces/c/src/xercesc/util/Platforms/IRIX/IRIXPlatformUtils.cpp
  
  Index: IRIXPlatformUtils.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/IRIX/IRIXPlatformUtils.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IRIXPlatformUtils.cpp     15 Nov 2002 21:05:45 -0000      1.4
  +++ IRIXPlatformUtils.cpp     2 Dec 2002 19:16:38 -0000       1.5
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.5  2002/12/02 19:16:38  tng
  + * [Bug 14723] Memory leak in atomicOpsMutex.  Patch from Adam Zell.
  + *
    * Revision 1.4  2002/11/15 21:05:45  tng
    * [Bug 14598] IRIX 6.5 / g++ 3.0.4 compilation bugs.  Patch from Richard Balint
    * .
  @@ -608,11 +611,16 @@
       arenaName = strdup ("/var/tmp/xerces-sharedmemXXXXXX");
       arena = usinit (mktemp (arenaName));
   
  -    atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex();
  +    if (atomicOpsMutex.fHandle == 0)
  +        atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex();
   }
   
   void XMLPlatformUtils::platformTerm()
   {
  +    // delete the mutex we created
  +    closeMutex(atomicOpsMutex.fHandle);
  +    atomicOpsMutex.fHandle = 0;
  +
       usdetach (arena);
       unlink (arenaName);
       free (arenaName);
  @@ -692,7 +700,8 @@
       // Normally, mutexes are created on first use, but there is a
       // circular dependency between compareAndExchange() and
       // mutex creation that must be broken.
  -    atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex();
  +    if (atomicOpsMutex.fHandle == 0)
  +        atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex();
   }
   
   void XMLPlatformUtils::platformTerm()
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to