Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [multiprocess RFA] Fix memory leak of focus_command
@ 2008-11-27 18:24 teawater
  2008-12-01 22:31 ` Michael Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: teawater @ 2008-11-27 18:24 UTC (permalink / raw)
  To: Stan Shebs; +Cc: gdb-patches

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

Hi Stan,

I found that focus_command doesn't free current_itset before overwrite
it. So I write a patch for it.

2008-11-27  Hui Zhu  <teawater@gmail.com>

	* infcmd.c (focus_command): Fix memory leak.

Thanks,
Hui

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

--- gdb.orig/infcmd.c
+++ gdb/infcmd.c
@@ -219,6 +219,8 @@
       return;
     }
 
+  if (current_itset)
+    xfree (current_itset);
   current_itset = itset;
 
   /* For now, set a current exec from the first element of the focus

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

end of thread, other threads:[~2008-12-01 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-27 18:24 [multiprocess RFA] Fix memory leak of focus_command teawater
2008-12-01 22:31 ` Michael Snyder
2008-12-01 22:39   ` Michael Snyder

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