Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
pack-objects: show progress for reused packfiles
[gitweb.git]
/
builtin
/
mv.c
diff --git
a/builtin/mv.c
b/builtin/mv.c
index 21c46d1636e6e87dd9eaaca60ac08ebbbc4efec3..7e26eb5229a0c8a526314cecb9860c3dfb0fed00 100644
(file)
--- a/
builtin/mv.c
+++ b/
builtin/mv.c
@@
-162,7
+162,8
@@
int cmd_mv(int argc, const char **argv, const char *prefix)
if (strncmp(path, src_w_slash, len_w_slash))
break;
}
- free((char *)src_w_slash);
+ if (src_w_slash != src)
+ free((char *)src_w_slash);
if (last - first < 1)
bad = _("source directory is empty");