From: Josh Steadmon Date: Wed, 29 Jan 2025 21:42:44 GMT Subject: Re: [PATCH v8 0/4] Introduce libgit-rs, a Rust wrapper around libgit.a Message-ID: <5g5wvfoyi7avilbex54m77ds3llwymgawk35o67szrzeffgctm@dvg6vl4a25my> In-Reply-To: <6ed6cf83-070c-4be2-b58d-398006cbb072@gmail.com> On 2025.01.29 15:24, Phillip Wood wrote: > Hi Josh > > On 28/01/2025 22:01, Josh Steadmon wrote: > > Thanks for re-rolling, the range-diff looks good to me apart from > > > +void libgit_configset_free(struct libgit_config_set *cs) > > +{ > > -+ git_configset_clear((struct config_set *) cs); > > -+ free((struct config_set *) cs); > > ++ git_configset_clear(&cs->cs); > > ++ free(&cs->cs); > > Which I think should be "free(cs)". In practice it does not matter because > we pass the same value to free() but it seems a bit odd to pass the address > of the first member of the struct rather than the address of the struct > itself. Yep sorry, got a bit careless with search-and-replace. Thanks for the catch! > I'm looking forward to seeing this merged soon > > Best Wishes > > Phillip >