Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup based on cppcheck pass (Devices and Extensions)
[palacios.git] / palacios / src / extensions / ext_trans_mem.c
index 5849f04..7fb8164 100644 (file)
@@ -1742,9 +1742,7 @@ deinit_trans_mem_core (struct guest_info * core,
     v3_lock_deinit(&(tm->addr_ctxt_lock));
     v3_lock_deinit(&(tm->access_type_lock));
 
-    if (tm) {
-        V3_Free(tm);
-    }
+    V3_Free(tm);
 
     return 0;
 }
@@ -1776,14 +1774,10 @@ tm_handle_xend (struct guest_info * core,
     /* XEND should raise a GPF when RTM mode is not on */
     if (tm->TM_MODE != TM_ON) {
         TM_ERR(core, UD, "Encountered XEND while not in a transactional region\n");
-        v3_free_staging_page(tm);
-        v3_clr_vtlb(core);
-        v3_clear_tm_lists(tm);
-        if (v3_raise_exception(core, GPF_EXCEPTION) == -1) {
-            TM_ERR(core, UD, "couldn't raise GPF\n");
-            return -1;
-        }
+
+        v3_raise_exception(core, GPF_EXCEPTION);
         return 0;
+
     }
 
     /* Our transaction finished! */