Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix varobj_update memleak
@ 2007-01-09 20:44 Vladimir Prus
  2007-01-09 21:51 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Prus @ 2007-01-09 20:44 UTC (permalink / raw)
  To: gdb-patches

[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-27 23:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-09 20:44 Fix varobj_update memleak Vladimir Prus
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox