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
This commit is contained in:
Junio C Hamano
2014-03-14 14:24:37 -07:00
4 changed files with 9 additions and 6 deletions

View File

@ -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");