[3/4] gdb: handle INTERNALVAR_FUNCTION in clear_internalvar
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
From: Simon Marchi <simon.marchi@efficios.com>
While checking the list of leaks reported by ASan, I found that
clear_internalvar doesn't free the internal_function object owned by the
internalvar when the internalvar is of kind INTERNALVAR_FUNCTION, fix
that.
Change-Id: I78f53b83b97bae39370a7b5ba5e1cec70626d66a
---
gdb/value.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -2322,6 +2322,10 @@ clear_internalvar (struct internalvar *var)
xfree (var->u.string);
break;
+ case INTERNALVAR_FUNCTION:
+ delete var->u.fn.function;
+ break;
+
default:
break;
}