X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-rm.c;h=33d04bd015e43965a1bc44bb281908298f152f6c;hb=e2b1d1ccdd2ef4db41819bb0d242b808cfe6c422;hp=593d86744c41a1f28258b3adb6e6cd556a64b61f;hpb=cd5fff64e6014f9c1d4c2bc113fde19bd45d2db7;p=git.git diff --git a/builtin-rm.c b/builtin-rm.c index 593d86744..33d04bd01 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;