This is a bugfix when handling errors in gp_config_from_dir. Per docs, ref_array_getlen returns a status code (0/EINVAL) and not the length of the array; the second parameter, i, is assigned the length of the array. Thus i >= 0 and len == 0, so i >= len and the for loop is never triggered.
Second, due to the implementation, error_list is a list of pointers to error message strings. This does not need to be freed as ini_config_augment handles this for us.
This is a bugfix when handling errors in gp_config_from_dir. Per docs, ref_array_getlen returns a status code (0/EINVAL) and not the length of the array; the second parameter,
i, is assigned the length of the array. Thusi >= 0andlen == 0, soi >= lenand the for loop is never triggered.Second, due to the implementation, error_list is a list of pointers to error message strings. This does not need to be freed as ini_config_augment handles this for us.