changeset 10721:d35c2cc056bf

8073559: Memory leak in jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp Reviewed-by: prr, azvegint
author serb
date Fri, 03 Apr 2015 12:41:13 +0100
parents 0b73c002d946
children f6dce22e5e79
files src/windows/native/sun/windows/awt_InputTextInfor.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_InputTextInfor.cpp	Wed Feb 18 16:59:51 2015 +0300
+++ b/src/windows/native/sun/windows/awt_InputTextInfor.cpp	Fri Apr 03 12:41:13 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -310,6 +310,8 @@
             readingMergedClauseW = new jstring[cMergedClauseW];
         } catch (std::bad_alloc&) {
             delete [] bndMergedClauseW;
+            delete [] bndClauseW;
+            delete [] readingClauseW;
             throw;
         }
 
@@ -394,6 +396,8 @@
             valMergedAttrW = new BYTE[cMergedAttrW];
         } catch (std::bad_alloc&) {
             delete [] bndMergedAttrW;
+            delete [] bndAttrW;
+            delete [] valAttrW;
             throw;
         }
         bndMergedAttrW[0] = 0;