Skip to content

Commit 0282afe

Browse files
committed
remote-curl: release filter options before re-setting them
This fixes a leak that is not detected by Git's test suite (but by microsoft/git's). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 88d7049 commit 0282afe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

remote-curl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ static int set_option(const char *name, size_t namelen, const char *value)
211211
options.refetch = 1;
212212
return 0;
213213
} else if (!strncmp(name, "filter", namelen)) {
214+
free(options.filter);
214215
options.filter = xstrdup(value);
215216
return 0;
216217
} else if (!strncmp(name, "object-format", namelen)) {

0 commit comments

Comments
 (0)