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:
authorJonathan Tan <jonathantanmy@google.com>2018-06-12 00:51:26 +0300
committerJunio C Hamano <gitster@pobox.com>2018-06-12 20:46:56 +0300
commitcac1137dc4908b03642ee10c45eb687feb9335c1 (patch)
tree8d9376384f99480bcde3a8d6c46f59fea1a00c11 /list-objects-filter-options.c
parentc7620bd0f35dddf8b8519da6fbf97014f46d0710 (diff)
list-objects: check if filter is NULL before using
In partial_clone_get_default_filter_spec(), the core_partial_clone_filter_default variable may be NULL; ensure that it is not NULL before using it. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects-filter-options.c')
-rw-r--r--list-objects-filter-options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 6a3cc985c4..c0e2bd6a06 100644
--- a/list-objects-filter-options.c
+++ b/list-objects-filter-options.c
@@ -146,6 +146,8 @@ void partial_clone_get_default_filter_spec(
/*
* Parse default value, but silently ignore it if it is invalid.
*/
+ if (!core_partial_clone_filter_default)
+ return;
gently_parse_list_objects_filter(filter_options,
core_partial_clone_filter_default,
NULL);