From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sun, 12 Mar 2017 18:02:24 +0000 Subject: [PATCH v8 1/1] ui-shared: allow to split the repository link In-Reply-To: <20170312175602.7mxqwckrfz26ioac@x230> References: <20170312170044.24780-1-petr.vorel@gmail.com> <20170312175602.7mxqwckrfz26ioac@x230> Message-ID: <20170312180224.GN2102@john.keeping.me.uk> On Sun, Mar 12, 2017 at 06:56:03PM +0100, Petr Vorel wrote: > > Teach cgit split the repository link in the top of repository "summary" > > view. This emulates the same behaviour as it's in gitweb. > > > This behaviour is not implemented for repositories which have > > "repo.name" set different than "repo.url". > > > Signed-off-by: Petr Vorel > > Cc: "Jason A. Donenfeld" > > Cc: John Keeping > > Reviewed-by: John Keeping > > --- > > cgitrc.5.txt | 4 +++- > > ui-shared.c | 28 +++++++++++++++++++++++++++- > > 2 files changed, 30 insertions(+), 2 deletions(-) > > > --- > > v7->v8: add missing free(). > actually, this breaks even more tests, please use v7. > Patch v7 breaks t0103-log.sh, but v8 breaks even some tests before: t0104-tree.sh. > Failure is in "summary, refs, log, tree, commit, diff" links > > John, I suppose free() shouldn't be used. Or am I missing something and I should free > something else? It's the return value of cgit_repourl() that needs to be freed, not the name. You'll need a new local variable for the result of calling cgit_repourl() which then needs to be freed in the loop.