8191767: Memory leak in JabSwitch
authorprr
Fri, 01 Dec 2017 10:30:57 -0800
changeset 48265 6e407f9da5fb
parent 48264 efda6932a433
child 48266 195b82f9f7d1
8191767: Memory leak in JabSwitch Reviewed-by: serb, ssadetsky
src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp
--- a/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp	Wed Nov 29 15:11:37 2017 -0800
+++ b/src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp	Fri Dec 01 10:30:57 2017 -0800
@@ -206,6 +206,7 @@
          len - 1 > sizeof(tempPath) - sizeof(acc_props2) ) {
         printf("The USERPROFILE environment variable is too long.\n");
         printf("It must be no longer than 233 characters.\n");
+        free(profilePath);
         return 123;
      }
     path[0] = 0;