Merge pull request #129 from prymitive/named_cache_stats

don't free lock name of a named cache
This commit is contained in:
unbit
2013-01-26 03:22:13 -08:00
+1 -1
View File
@@ -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");