Skip to content

Commit ce632e9

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 <[email protected]>
1 parent 05c4c1d commit ce632e9

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
@@ -212,6 +212,7 @@ static int set_option(const char *name, size_t namelen, const char *value)
212212
options.refetch = 1;
213213
return 0;
214214
} else if (!strncmp(name, "filter", namelen)) {
215+
free(options.filter);
215216
options.filter = xstrdup(value);
216217
return 0;
217218
} else if (!strncmp(name, "object-format", namelen)) {

0 commit comments

Comments
 (0)