)]}'
{
  "commit": "5d4187339f9f2f338d540adbdfd174aa9f1e92ab",
  "tree": "1a0af6ebcf2de425cbea28755e3cfac5a4bb58a0",
  "parents": [
    "93c145c2aaf3b85b7c3b7abee029da5438d6732f"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Fri Apr 18 22:42:17 2025 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Tue Apr 22 17:21:59 2025 +0100"
  },
  "message": "gdb/python: fix memory leak of gdb.Color objects\n\nI noticed that this commit:\n\n  commit 6447969d0ac774b6dec0f95a0d3d27c27d158690\n  Date:   Sat Oct 5 22:27:44 2024 +0300\n\n      Add an option with a color type.\n\nhas an unnecessary `Py_INCREF (self);` in gdb.Color.__init__.  This\nmeans that the reference count on all gdb.Color objects (that pass\nthrough __init__) will be +1 from where they should normally be, and\nthis will stop the gdb.Color objects from being deallocated.\n\nFix by removing the Py_INCREF call.\n\nAdd a test which exposes the memory leak.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "91ad7ae7bc9983192b87aa634404f9664bd08251",
      "old_mode": 33188,
      "old_path": "gdb/python/py-color.c",
      "new_id": "28f4142dd4752bdf6516d71a4e2e0ae0f1b0a108",
      "new_mode": 33188,
      "new_path": "gdb/python/py-color.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6d7fa7c3833c8712faaf003743d110925e137995",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-color-leak.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "50dc315985d28d588d1afdec7d9a5bc585d90a46",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.python/py-color-leak.py"
    }
  ]
}
