From 5bbc7ee6731b231e2beb41de8099107df3a0e573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sat, 26 Jan 2013 11:56:16 +0100 Subject: [PATCH] don't free lock name of a named cache --- core/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cache.c b/core/cache.c index 2f0a1705..84dd5cdd 100644 --- a/core/cache.c +++ b/core/cache.c @@ -129,9 +129,9 @@ void uwsgi_cache_init(struct uwsgi_cache *uc) { uc->data = ((char *)uc->items) + ((sizeof(struct uwsgi_cache_item)+uc->keysize) * uc->max_items); if (uc->name) { + // can't free that until shutdown char *lock_name = uwsgi_concat2("cache_", uc->name); uc->lock = uwsgi_rwlock_init(lock_name); - free(lock_name); } else { uc->lock = uwsgi_rwlock_init("cache");