)]}'
{
  "commit": "bda959c4766d73ab435f26f2cc7c8c67b9443f5a",
  "tree": "d7ddc14cf2d77d2a9a467ce6e2c83dece7618fcb",
  "parents": [
    "74b052f8c269ef0b6f61a5ecf04a8568399345d9"
  ],
  "author": {
    "name": "Matheus Tavares",
    "email": "matheus.bernardino@usp.br",
    "time": "Mon Sep 28 21:01:53 2020 -0300"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Sep 28 17:41:53 2020 -0700"
  },
  "message": "packfile: fix memory leak in add_delta_base_cache()\n\nWhen add_delta_base_cache() is called with a base that is already in the\ncache, no operation is performed. But the check is done after allocating\nspace for a new entry, so we end up leaking memory on the early return.\nIn addition, the caller never free()\u0027s the base as it expects the\nfunction to take ownership of it. But the base is not released when we\nskip insertion, so it also gets leaked. To fix these problems, move the\nallocation of a new entry further down in add_delta_base_cache(), and\nfree() the base on early return.\n\nSigned-off-by: Matheus Tavares \u003cmatheus.bernardino@usp.br\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bfe76b2119e0d37fce028e30462de3999443d1ba",
      "old_mode": 33188,
      "old_path": "packfile.c",
      "new_id": "06d51eddac117ddf92458b317486916e52fedb18",
      "new_mode": 33188,
      "new_path": "packfile.c"
    }
  ]
}
