Merge pull request #2846 from JIghtuse/master

pathspec: do not try to dereference NULL
This commit is contained in:
Carlos Martín Nieto 2015-01-26 17:29:15 +01:00
commit f101a7d4ff

View File

@ -296,6 +296,9 @@ int git_pathspec_matches_path(
static void pathspec_match_free(git_pathspec_match_list *m) static void pathspec_match_free(git_pathspec_match_list *m)
{ {
if (!m)
return;
git_pathspec_free(m->pathspec); git_pathspec_free(m->pathspec);
m->pathspec = NULL; m->pathspec = NULL;