From 4b357298a23cfb0583851e7cd5cc937470949623 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 6 Sep 2009 17:06:56 +0200 Subject: [PATCH] src/utils_cache.c: Fix a very rare deadlock situation. Only happened in an out-of-memory situation. Still, not nice ;) --- src/utils_cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils_cache.c b/src/utils_cache.c index 9e7bc067..648c54de 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -1003,6 +1003,9 @@ static meta_data_t *uc_get_meta (const value_list_t *vl) /* {{{ */ if (ce->meta == NULL) ce->meta = meta_data_create (); + if (ce->meta == NULL) + pthread_mutex_unlock (&cache_lock); + return (ce->meta); } /* }}} meta_data_t *uc_get_meta */ -- 2.30.2