From cac1137dc4908b03642ee10c45eb687feb9335c1 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Mon, 11 Jun 2018 14:51:26 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- list-objects-filter-options.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'list-objects-filter-options.c') 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); -- cgit v1.2.3