summaryrefslogtreecommitdiff
path: root/builtin-rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-rm.c')
-rw-r--r--builtin-rm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-rm.c b/builtin-rm.c
index 593d86744c..33d04bd015 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -32,7 +32,7 @@ static int remove_file(const char *name)
ret = unlink(name);
if (!ret && (slash = strrchr(name, '/'))) {
- char *n = strdup(name);
+ char *n = xstrdup(name);
do {
n[slash - name] = 0;
name = n;