summaryrefslogtreecommitdiff
path: root/builtin/hash-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/hash-object.c')
-rw-r--r--builtin/hash-object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 2ea36909d2..bbeaf20bcc 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -145,7 +145,7 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)
char *to_free = NULL;
if (prefix)
- arg = to_free = xstrdup(prefix_filename(prefix, arg));
+ arg = to_free = prefix_filename(prefix, arg);
hash_object(arg, type, no_filters ? NULL : vpath ? vpath : arg,
flags, literally);
free(to_free);