Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] varobj.c, value_of_root, (another) memory leak
@ 2007-08-10 23:01 msnyder
  2007-08-11  1:40 ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: msnyder @ 2007-08-10 23:01 UTC (permalink / raw)
  To: gdb-patches

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

I'm not totally sure about this -- does the return value of var_get_type
need to be freed?  If so, there are some other places in mi-cmd-var
where it isn't being.


[-- Attachment #2: 147.txt --]
[-- Type: text/plain, Size: 580 bytes --]

2007-08-10  Michael Snyder  <msnyder@access-company.com>

	* varobj.c (value_of_root): Memory leak.

Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.90
diff -p -r1.90 varobj.c
*** varobj.c	8 Aug 2007 21:46:37 -0000	1.90
--- varobj.c	10 Aug 2007 22:58:51 -0000
*************** value_of_root (struct varobj **var_handl
*** 1741,1746 ****
--- 1741,1748 ----
  	  var = *var_handle;
  	  *type_changed = 1;
  	}
+       xfree (old_type);
+       xfree (new_type);
      }
    else
      {

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

end of thread, other threads:[~2007-08-17 23:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-10 23:01 [PATCH] varobj.c, value_of_root, (another) memory leak msnyder
2007-08-11  1:40 ` Nick Roberts
2007-08-11  2:41   ` Daniel Jacobowitz
2007-08-11 20:10     ` msnyder
2007-08-17 23:21   ` msnyder

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