Re: [PATCH v2] fill_oids_from_packs: fix memory leak when fill_oids_from_packs failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 09, 2025 at 07:14:28AM +0000, Lidong Yan via GitGitGadget wrote:
> From: Lidong Yan <502024330056@xxxxxxxxxxxxxxxx>
> 
> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux