JDWP: avoid crash on unsupported modifier

Returns NOT_IMPLEMENTED error if we receive an event request with an
unsupported modifier.

Bug: https://code.google.com/p/android/issues/detail?id=81037
Bug: 18617787
Change-Id: I97729e2f98af3a75d24604926a89860255d4acae
diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc
index e6d7e7b..2d0301f 100644
--- a/runtime/jdwp/jdwp_handler.cc
+++ b/runtime/jdwp/jdwp_handler.cc
@@ -1344,8 +1344,10 @@
       }
       break;
     default:
-      LOG(WARNING) << "GLITCH: unsupported modKind=" << mod.modKind;
-      break;
+      LOG(WARNING) << "Unsupported modifier " << mod.modKind << " for event " << pEvent->eventKind;
+      // Free allocated event to avoid leak before leaving.
+      EventFree(pEvent);
+      return JDWP::ERR_NOT_IMPLEMENTED;
     }
   }