]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/reset.c
Merge branch 'jk/bundle-use-dash-for-stdfiles'
[thirdparty/git.git] / builtin / reset.c
index 58f567afd3ecb8246649a8c6dfd37e58b01c8160..24b04aeecb9222750fe9dd7dcff1e1ab97cb467f 100644 (file)
@@ -318,7 +318,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;
@@ -496,5 +497,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
 
 cleanup:
        clear_pathspec(&pathspec);
+       free(pathspec_from_file);
        return update_ref_status;
 }