Fixed a case where we might be able to acquire a mutex with a try lock and
not release it by making sure a mutex locker object is appropriately used.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112996 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index aa3cf6b..815cece 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1117,7 +1117,8 @@
     if (m_gdb_comm.IsRunning())
     {
         bool timed_out = false;
-        if (!m_gdb_comm.SendInterrupt (2, &timed_out))
+        Mutex::Locker locker;
+        if (!m_gdb_comm.SendInterrupt (locker, 2, &timed_out))
         {
             if (timed_out)
                 error.SetErrorString("timed out sending interrupt packet");
@@ -1150,7 +1151,8 @@
         log->Printf ("ProcessGDBRemote::DoDestroy()");
 
     // Interrupt if our inferior is running...
-    m_gdb_comm.SendInterrupt (1);
+    Mutex::Locker locker;
+    m_gdb_comm.SendInterrupt (locker, 1);
     DisableAllBreakpointSites ();
     SetExitStatus(-1, "process killed");