diff options
Diffstat (limited to 'builtin/reset.c')
-rw-r--r-- | builtin/reset.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/reset.c b/builtin/reset.c index d2e0185e55..28083387cb 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -316,7 +316,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix) int reset_type = NONE, update_ref_status = 0, quiet = 0; int no_refresh = 0; int patch_mode = 0, pathspec_file_nul = 0, unborn; - const char *rev, *pathspec_from_file = NULL; + const char *rev; + char *pathspec_from_file = NULL; struct object_id oid; struct pathspec pathspec; int intent_to_add = 0; @@ -486,5 +487,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix) if (!pathspec.nr) remove_branch_state(the_repository, 0); + free(pathspec_from_file); return update_ref_status; } |