From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sat, 16 Jun 2018 15:24:54 +0100 Subject: [PATCH 06/11] ui-tree: free read_sha1_file() buffer after use In-Reply-To: <152885532044.7253.6401778905443111437.stgit@mail.warmcat.com> References: <152885510454.7253.3542488576272033383.stgit@mail.warmcat.com> <152885532044.7253.6401778905443111437.stgit@mail.warmcat.com> Message-ID: <20180616142454.GU1922@john.keeping.me.uk> On Wed, Jun 13, 2018 at 10:02:00AM +0800, Andy Green wrote: > Free up the buffer allocated in read_sha1_file() > > Signed-off-by: Andy Green Reviewed-by: John Keeping I've extracted this from the series and pushed it on my for-jason branch: https://git.zx2c4.com/cgit/log/?h=jk/for-jason > --- > ui-tree.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ui-tree.c b/ui-tree.c > index 723e16e..fe5dc75 100644 > --- a/ui-tree.c > +++ b/ui-tree.c > @@ -222,6 +222,7 @@ static void print_object(const unsigned char *sha1, char *path, const char *base > } > > free(mimetype); > + free(buf); > } > > struct single_tree_ctx { >