Merge
authorsspitsyn
Wed, 18 Oct 2017 22:10:28 +0000
changeset 47653 e8a76ff6e1a4
parent 47650 80e75cbb08d6 (current diff)
parent 47652 6de1ff734cf1 (diff)
child 47656 e0b35048532e
Merge
--- a/src/java.instrument/share/native/libinstrument/JPLISAgent.c	Wed Oct 18 21:06:31 2017 +0000
+++ b/src/java.instrument/share/native/libinstrument/JPLISAgent.c	Wed Oct 18 22:10:28 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -783,7 +783,10 @@
     int len = (last_slash == NULL) ? 0 : (int)(last_slash - cname);
     char* pkg_name_buf = (char*)malloc(len + 1);
 
-    jplis_assert_msg(pkg_name_buf != NULL, "OOM error in native tmp buffer allocation");
+    if (pkg_name_buf == NULL) {
+        fprintf(stderr, "OOM error in native tmp buffer allocation");
+        return NULL;
+    }
     if (last_slash != NULL) {
         strncpy(pkg_name_buf, cname, len);
     }