This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[4.0] Patch: FYI: fix PR 26351
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 07 Mar 2006 10:01:49 -0700
- Subject: [4.0] Patch: FYI: fix PR 26351
- Reply-to: tromey at redhat dot com
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;