Patrick Steinhardt <ps@xxxxxx> writes: > Some of the command line options in `cmd_pack_refs()` require us to > allocate memory. This memory is never released and thus leaking, but we > paper over this leak by declaring the respective variables as `static` > function-level variables, which is somewhat awkward. > > Refactor the code to release the allocated memory and drop the `static` > declaration. While at it, remove the useless `flags` variable. > Tangent: I was looking at `files_pack_refs` and it seems like there are a bunch of `die(...)` calls there. I wonder if it would be nicer to use `error()` instead so we could do a better job at cleanup.
Attachment:
signature.asc
Description: PGP signature