aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/source-execution.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2025-04-18 22:42:17 +0100
committerAndrew Burgess <aburgess@redhat.com>2025-04-22 17:21:59 +0100
commit5d4187339f9f2f338d540adbdfd174aa9f1e92ab (patch)
tree1a0af6ebcf2de425cbea28755e3cfac5a4bb58a0 /gdb/testsuite/gdb.base/source-execution.c
parent93c145c2aaf3b85b7c3b7abee029da5438d6732f (diff)
downloadbinutils-5d4187339f9f2f338d540adbdfd174aa9f1e92ab.zip
binutils-5d4187339f9f2f338d540adbdfd174aa9f1e92ab.tar.gz
binutils-5d4187339f9f2f338d540adbdfd174aa9f1e92ab.tar.bz2
gdb/python: fix memory leak of gdb.Color objects
I noticed that this commit: commit 6447969d0ac774b6dec0f95a0d3d27c27d158690 Date: Sat Oct 5 22:27:44 2024 +0300 Add an option with a color type. has an unnecessary `Py_INCREF (self);` in gdb.Color.__init__. This means that the reference count on all gdb.Color objects (that pass through __init__) will be +1 from where they should normally be, and this will stop the gdb.Color objects from being deallocated. Fix by removing the Py_INCREF call. Add a test which exposes the memory leak. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.base/source-execution.c')
0 files changed, 0 insertions, 0 deletions