Browse Source

Merge branch 'rs/archive-plug-leak-refname'

Memleak fix.

* rs/archive-plug-leak-refname:
  archive: release refname after use
maint
Junio C Hamano 4 years ago
parent
commit
3eebb3e044
  1. 1
      archive.c
  2. 2
      archive.h

1
archive.c

@ -658,6 +658,7 @@ int write_archive(int argc, const char **argv, const char *prefix, @@ -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;
}

2
archive.h

@ -8,7 +8,7 @@ struct repository; @@ -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;

Loading…
Cancel
Save