From 03eebbcfcd8a684795dbc2735bdd624657e3f164 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Fri, 21 May 2021 09:28:42 +0000 Subject: ctimeline: free fields of struct ctimeline_branch_list in the appropriate func --- ctimeline.c | 5 +++++ ui-common.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ctimeline.c b/ctimeline.c index f2a114a..31c0e1b 100644 --- a/ctimeline.c +++ b/ctimeline.c @@ -31,10 +31,15 @@ static void prepare_context() */ static void forget_context() { + int i; string_release(ctx.head_title); string_release(ctx.css); string_release(ctx.header_title); string_release(ctx.header_desc); + for(i = 0; i < ctx.branches.count; i++) { + string_release(ctx.branches.list[i].name); + string_release(ctx.branches.list[i].desc); + } free(ctx.branches.list); } diff --git a/ui-common.c b/ui-common.c index 87bae9a..a417180 100644 --- a/ui-common.c +++ b/ui-common.c @@ -63,8 +63,6 @@ void print_timelines() "\n", (i % 2) ? "left" : "right", br->name->s, br->age_from, br->age_to, br->desc->s); - string_release(br->name); - string_release(br->desc); } printf("\n"); -- cgit v1.2.3-18-g5258