Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: Fix varobj_update memleak
Date: Tue, 09 Jan 2007 20:44:00 -0000	[thread overview]
Message-ID: <200701092343.12106.ghost@cs.msu.su> (raw)

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]


I suppose I wrote two much C++ code, where destructors just work.
OK?

- Volodya

	Fix memory leak.
	* varobj.c (varobj_update): Free temporary vectors.

[-- Attachment #2: varobj_update_memleak__gdb_mainline.diff --]
[-- Type: text/x-diff, Size: 334 bytes --]

--- gdb/varobj.c	(/mirrors/gdb_mainline)	(revision 3134)
+++ gdb/varobj.c	(/patches/gdb/varobj_update_memleak/gdb_mainline)	(revision 3134)
@@ -1143,6 +1143,9 @@ varobj_update (struct varobj **varp, str
     }
   *cv = 0;
 
+  VEC_free (varobj_p, stack);
+  VEC_free (varobj_p, result);
+
   if (type_changed)
     return -2;
   else

             reply	other threads:[~2007-01-09 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09 20:44 Vladimir Prus [this message]
2007-01-09 21:51 ` Daniel Jacobowitz
2007-02-27 22:34   ` Nick Roberts
2007-02-27 23:09     ` Daniel Jacobowitz
2007-02-27 23:43       ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701092343.12106.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox