Skip to content

Commit

Permalink
Merge branch 'rs/archive-plug-leak-refname'
Browse files Browse the repository at this point in the history
Memleak fix.

* rs/archive-plug-leak-refname:
  archive: release refname after use
  • Loading branch information
gitster committed Nov 25, 2020
2 parents b5b71cb + 1c3e412 commit 3eebb3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ int write_archive(int argc, const char **argv, const char *prefix,
rc = ar->write_archive(ar, &args);

string_list_clear_func(&args.extra_files, extra_file_info_clear);
free(args.refname);

return rc;
}
Expand Down
2 changes: 1 addition & 1 deletion archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct repository;

struct archiver_args {
struct repository *repo;
const char *refname;
char *refname;
const char *prefix;
const char *base;
size_t baselen;
Expand Down

0 comments on commit 3eebb3e

Please sign in to comment.