This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.0] Patch: FYI: fix PR 26351


I'm checking this in on the 4.0 branch.

This fixes a memory leak as reported in PR 26351.  This bug does not
appear in 4.1 and later.

The PR was reported against 3.4.5, but I don't think we're putting
any more fixes on that branch, so I'm not checking it in there.

Tom

Index: ChangeLog
from  fexx  <fexx@fexx.org>

	PR libgcj/26351:
	* gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Free
	'addrs' if it is set.

Index: gnu/gcj/runtime/natStackTrace.cc
===================================================================
--- gnu/gcj/runtime/natStackTrace.cc	(revision 110667)
+++ gnu/gcj/runtime/natStackTrace.cc	(working copy)
@@ -1,6 +1,6 @@
 // natStackTrace.cc - native helper methods for Throwable
 
-/* Copyright (C) 2000, 2002, 2003  Free Software Foundation, Inc
+/* Copyright (C) 2000, 2002, 2003, 2006  Free Software Foundation, Inc
 
    This file is part of libgcj.
 
@@ -118,6 +118,8 @@
   else
     frame = NULL;
 
+  if (addrs != NULL)
+    _Jv_Free (addrs);
   addrs = reinterpret_cast<gnu::gcj::RawData *> (frame);
 #else // HAVE_BACKTRACE
   (void)maxlen;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]