aboutsummaryrefslogtreecommitdiff
path: root/builtin-tar-tree.c
diff options
context:
space:
mode:
authorRene Scharfe <rene.scharfe@lsrfire.ath.cx>2006-09-10 18:10:01 +0200
committerJunio C Hamano <junkio@cox.net>2006-09-10 13:39:01 -0700
commit326711c16879792da8d7159bf29d080569c3a1e0 (patch)
treed31690ffce157779efebf6902aeb6c1d0db1646d /builtin-tar-tree.c
parent37f944363d5b5fb5bcbf2d184865534739713c01 (diff)
downloadgit-326711c16879792da8d7159bf29d080569c3a1e0.tar.gz
git-326711c16879792da8d7159bf29d080569c3a1e0.tar.xz
Use xstrdup instead of strdup in builtin-{tar,zip}-tree.c
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 5d2aea4cb383a43e40d47ab69d8ad7a495df6ea2 commit)
Diffstat (limited to 'builtin-tar-tree.c')
-rw-r--r--builtin-tar-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index c20eb0e36..e8e492fa0 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -390,7 +390,7 @@ int write_tar_archive(struct archiver_args *args)
write_global_extended_header(args->commit_sha1);
if (args->base && plen > 0 && args->base[plen - 1] == '/') {
- char *base = strdup(args->base);
+ char *base = xstrdup(args->base);
int baselen = strlen(base);
while (baselen > 0 && base[baselen - 1] == '/')