Skip to content

Commit 5c1ebc2

Browse files
committed
SQUASH??? leakfix
1 parent 4a8fad3 commit 5c1ebc2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

builtin/backfill.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,11 @@ static int do_backfill(struct backfill_context *ctx)
9292

9393
if (ctx->sparse) {
9494
CALLOC_ARRAY(info.pl, 1);
95-
if (get_sparse_checkout_patterns(info.pl))
95+
if (get_sparse_checkout_patterns(info.pl)) {
96+
clear_pattern_list(info.pl);
97+
free(info.pl);
9698
return error(_("problem loading sparse-checkout"));
99+
}
97100
}
98101

99102
repo_init_revisions(ctx->repo, &revs, "");
@@ -113,6 +116,11 @@ static int do_backfill(struct backfill_context *ctx)
113116
download_batch(ctx);
114117

115118
clear_backfill_context(ctx);
119+
release_revisions(&revs);
120+
if (info.pl) {
121+
clear_pattern_list(info.pl);
122+
free(info.pl);
123+
}
116124
return ret;
117125
}
118126

0 commit comments

Comments
 (0)