Hi, While performing some Valgrind profiling on GDB we found that the "read_string" function in valprint.c can leak clean-ups. This happens as it does not account for a previous clean-up in the local chain and overwrites the local "old_chain" place holder with a new one. This patch reworks the function's clean-up logic, only registering one clean-up at the beginning and including a new clean-up function. This new clean-up function frees buffers referenced by double indirection. This patch neither increases or decreases regressions in the test-suite. It was built and tested on X86_64. 2009-02-27 Phil Muldoon * valprint.c (xfree_gdb_byte): New function. (read_string): Rework clean-up logic. Use xfree_gdb_byte for clean-up.