Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-15 01:24:37 +0400
committerJunio C Hamano <gitster@pobox.com>2014-03-15 01:24:37 +0400
commit7aab05d2b4114c932f433a8de20707b9c56f8cd3 (patch)
tree1f375d2d0ceab6fae1c2f50124dbb204f415706f /builtin
parentb7de45b58e0ff8ee552a965fa081c4453adfb239 (diff)
parent78368f2c1ad342719ccf1e719bd5126ca6c7b68b (diff)
Merge branch 'jk/janitorial-fixes'
* jk/janitorial-fixes: open_istream(): do not dereference NULL in the error case builtin/mv: don't use memory after free utf8: use correct type for values in interval table utf8: fix iconv error detection notes-utils: handle boolean notes.rewritemode correctly
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/mv.c b/builtin/mv.c
index 21c46d1636..7e26eb5229 100644
--- 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");