Re: [PATCHv2 1/6] pretty: free the gpg status buf
- From
Jeff King <peff@peff.net>
- Date
- Jun 13, 2014, 11:39 UTC
- Message-ID
- <20140613113957.GD14066@sigill.intra.peff.net>
- In-Reply-To
- <3211097b9e6eb07b98d3cefdaf4eabd0d2eb55b0.1402655839.git.git@drmicha.warpmail.net>
On Fri, Jun 13, 2014 at 12:42:43PM +0200, Michael J Gruber wrote:
Show 21 quoted lines
> 4a868fd (pretty: parse the gpg status lines rather than the output, 2013-02-14) > made the gpg status lines available to callers and made sure they freed > the used space, but missed one spot. > > Free the status line buffer also in the remaining spot. > > Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> > --- > pretty.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/pretty.c b/pretty.c > index 4f51287..f1e8a70 100644 > --- a/pretty.c > +++ b/pretty.c > @@ -1538,6 +1538,7 @@ void format_commit_message(const struct commit *commit, > free(context.commit_encoding); > logmsg_free(context.message, commit); > free(context.signature_check.gpg_output); > + free(context.signature_check.gpg_status); > free(context.signature_check.signer);
What about .key?
I would have expected your patch 6 to come first, which would fix this, and then save you from making similar mistakes in patch 3. :)
-Peff