provide a nice @{...} syntax to always mean the current branch reflog
[gitweb.git] / builtin-archive.c
index 391cf43911a16ec49862c18b7dd4f1f094d49de8..f613ac25164beadb4874d8a07b6bbac62796a530 100644 (file)
@@ -74,6 +74,7 @@ static int run_remote_archiver(const char *remote, int argc,
        /* Now, start reading from fd[0] and spit it out to stdout */
        rv = recv_sideband("archive", fd[0], 1, 2);
        close(fd[0]);
+       close(fd[1]);
        rv |= finish_connect(pid);
 
        return !!rv;
@@ -137,7 +138,6 @@ void parse_treeish_arg(const char **argv, struct archiver_args *ar_args,
                if (err || !S_ISDIR(mode))
                        die("current working directory is untracked");
 
-               free(tree);
                tree = parse_tree_indirect(tree_sha1);
        }
        ar_args->tree = tree;