* [PATCH] stack.c, memory leak (no-effect code?)
@ 2007-08-10 22:19 msnyder
2007-08-13 19:41 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: msnyder @ 2007-08-10 22:19 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
This patch is to fix a memory leak, but while you're looking at it...
does it seem to you that these two blocks have any effect?
[Sorry if I posted this before, I've been searching for it...]
[-- Attachment #2: 160.txt --]
[-- Type: text/plain, Size: 926 bytes --]
2007-08-04 Michael Snyder <msnyder@access-company.com>
* stack.c (print_frame): Memory leak.
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.150
diff -p -r1.150 stack.c
*** stack.c 25 Jul 2007 00:28:25 -0000 1.150
--- stack.c 5 Aug 2007 02:16:10 -0000
*************** print_frame (struct frame_info *frame, i
*** 582,587 ****
--- 582,589 ----
the symbol table. That'll have parameters, but
that's preferable to displaying a mangled name. */
funname = SYMBOL_PRINT_NAME (func);
+ else
+ xfree (demangled);
}
}
}
*************** frame_info (char *addr_exp, int from_tty
*** 882,887 ****
--- 884,891 ----
preferable to displaying a mangled name. */
if (demangled == NULL)
funname = SYMBOL_PRINT_NAME (func);
+ else
+ xfree (demangled);
}
}
else
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] stack.c, memory leak (no-effect code?)
2007-08-10 22:19 [PATCH] stack.c, memory leak (no-effect code?) msnyder
@ 2007-08-13 19:41 ` Jim Blandy
2007-08-13 22:27 ` msnyder
0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2007-08-13 19:41 UTC (permalink / raw)
To: msnyder; +Cc: gdb-patches
msnyder@sonic.net writes:
> This patch is to fix a memory leak, but while you're looking at it...
> does it seem to you that these two blocks have any effect?
>
> [Sorry if I posted this before, I've been searching for it...]
You did post something very much like this, but I recall that the
blocks in question in the older post really didn't have any effect.
These at least set funname.
I'm kind of surprised that they don't set funname to demangled when
it's non-NULL.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] stack.c, memory leak (no-effect code?)
2007-08-13 19:41 ` Jim Blandy
@ 2007-08-13 22:27 ` msnyder
2007-08-18 0:20 ` msnyder
0 siblings, 1 reply; 4+ messages in thread
From: msnyder @ 2007-08-13 22:27 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
>
> msnyder@sonic.net writes:
>> This patch is to fix a memory leak, but while you're looking at it...
>> does it seem to you that these two blocks have any effect?
>>
>> [Sorry if I posted this before, I've been searching for it...]
>
> You did post something very much like this, but I recall that the
> blocks in question in the older post really didn't have any effect.
> These at least set funname.
>
> I'm kind of surprised that they don't set funname to demangled when
> it's non-NULL.
OK, how about the patch itself?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] stack.c, memory leak (no-effect code?)
2007-08-13 22:27 ` msnyder
@ 2007-08-18 0:20 ` msnyder
0 siblings, 0 replies; 4+ messages in thread
From: msnyder @ 2007-08-18 0:20 UTC (permalink / raw)
To: msnyder; +Cc: Jim Blandy, gdb-patches
>>
>> msnyder@sonic.net writes:
>>> This patch is to fix a memory leak, but while you're looking at it...
>>> does it seem to you that these two blocks have any effect?
>>>
>>> [Sorry if I posted this before, I've been searching for it...]
>>
>> You did post something very much like this, but I recall that the
>> blocks in question in the older post really didn't have any effect.
>> These at least set funname.
>>
>> I'm kind of surprised that they don't set funname to demangled when
>> it's non-NULL.
>
> OK, how about the patch itself?
So, checking in the patch, ignoring the possibility of dead code.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-18 0:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-10 22:19 [PATCH] stack.c, memory leak (no-effect code?) msnyder
2007-08-13 19:41 ` Jim Blandy
2007-08-13 22:27 ` msnyder
2007-08-18 0:20 ` msnyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox