From: Patrick Steinhardt Date: Fri, 09 May 2025 08:25:15 GMT Subject: Re: [PATCH v2] fill_oids_from_packs: fix memory leak when fill_oids_from_packs failed Message-ID: In-Reply-To: On Fri, May 09, 2025 at 07:14:28AM +0000, Lidong Yan via GitGitGadget wrote: > From: Lidong Yan <502024330056@smail.nju.edu.cn> > > In commit-graph.c:fill_oids_from_packs, if open_pack_index failed, > memory allocated and returned by add_packed_git will leak. Simply > add close_pack and free(p) will solve this problem. One more thing that I missed in the first review: the commit subject should mention the subsystem as prefix, not the specific function. So It should e.g. read: commit-grap: fix memory leak when `fill_oids_from_packs()` fails Patrick