Tanay Abhra <tanay...@gmail.com> writes:

> For the config_cache_free(), would this change be enough?
> +static void config_cache_free(void)
> +{
> +     struct hashmap *config_cache;
> +     struct config_cache_entry *entry;
> +     struct hashmap_iter iter;
> +     if (!hashmap_initialized)
> +             return;
> +     config_cache = get_config_cache();

That sounds better to me. And it justifies the different scopes: one can
ask whether the map is initialized from anywhere in the file, but can
only get the map after initialization, so it prevents mis-use of an
uninitialized pointer.

Matthieu Moy
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to