don't free lock name of a named cache

This commit is contained in:
Łukasz Mierzwa
2013-01-26 11:56:16 +01:00
parent 37927c6f5d
commit 5bbc7ee673
+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");