summaryrefslogtreecommitdiff
path: root/memdebug/memdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'memdebug/memdebug.c')
-rw-r--r--memdebug/memdebug.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/memdebug/memdebug.c b/memdebug/memdebug.c
index 887ca42..b0af5b1 100644
--- a/memdebug/memdebug.c
+++ b/memdebug/memdebug.c
@@ -7,6 +7,10 @@
* Copyright (c) 2010 Zurich University of Applied Sciences
* Copyright (c) 2010 Tobias Klauser <tklauser@distanz.ch>
*
+ * HISTORY
+ * 12.11.2010 gram Bug in function 'memdebug_cleanup' corrected (access
+ * just freed struct)
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@@ -44,11 +48,12 @@ void memdebug_start(void)
void memdebug_cleanup(void)
{
- struct memdebug_heap_item *hi;
+ struct memdebug_heap_item *hi, *next;
- for (hi = heap_head; hi; hi = hi->next) {
+ for (hi = heap_head; hi; hi = next) {
if (hi->addr)
free(hi->addr);
+ next = hi->next;
free(hi);
}
d to keep this behavior. * In dmesg.py: in python 3 log_buf is now a "memoryview" object which needs to be converted to a string in order to use string methods like "splitlines()". Luckily memoryview exists in python 2.7.6 as well, so we can convert log_buf to memoryview and use the same code in both python 2 and python 3. This version of the patch has now been tested with gdb 7.7 and both python 3.4 and python 2.7.6 (I think asking for at least python 2.7.6 is a reasonable requirement instead of complicating the code with version checks etc). Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/linux/symbols.py')