diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-01-26 17:29:15 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-01-26 17:29:15 +0100 |
commit | f101a7d4ff11a270487964c480f08d24350842e0 (patch) | |
tree | 844c9fd5525b60f61afaa1e3b4b1c1f33e4afeaf | |
parent | 73c5db7663b16f8aee2176ae8a5a4ed5127d5c35 (diff) | |
parent | dc5fe00c6562e46c88a5c5b975121c202eae1180 (diff) | |
download | libgit2-f101a7d4ff11a270487964c480f08d24350842e0.tar.gz |
Merge pull request #2846 from JIghtuse/master
pathspec: do not try to dereference NULL
-rw-r--r-- | src/pathspec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pathspec.c b/src/pathspec.c index 8b469f717..6aef574c8 100644 --- a/src/pathspec.c +++ b/src/pathspec.c @@ -296,6 +296,9 @@ int git_pathspec_matches_path( static void pathspec_match_free(git_pathspec_match_list *m) { + if (!m) + return; + git_pathspec_free(m->pathspec); m->pathspec = NULL; |