hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
changeset 17357 98206e5df09e
parent 17077 8607f7c33310
child 17373 7d8bb2a8787e
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Tue May 07 01:25:21 2013 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp	Tue May 07 09:46:15 2013 -0400
@@ -3366,6 +3366,10 @@
   }
 #endif
 
+  // NULL out in scratch class to not delete twice.  The class to be redefined
+  // always owns these bytes.
+  scratch_class->set_cached_class_file(NULL, 0);
+
   // Replace inner_classes
   Array<u2>* old_inner_classes = the_class->inner_classes();
   the_class->set_inner_classes(scratch_class->inner_classes());