diff options
author | Grigori Goronzy <greg@blackbox> | 2011-07-06 22:47:56 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-07-06 22:47:56 +0200 |
commit | 87d472953d5eb58a0e0b8d6414e7ffcd3678d83a (patch) | |
tree | 331ba2ac4406955e53021c53a6421796f4d11235 | |
parent | cd5a2230524cff693bf678f6430f563b5a6b5afe (diff) | |
download | libass-87d472953d5eb58a0e0b8d6414e7ffcd3678d83a.tar.bz2 libass-87d472953d5eb58a0e0b8d6414e7ffcd3678d83a.tar.xz |
Fix cache leak
Fixes a leak introduced with the new cache functions, caused by wrong
pointer usage.
-rw-r--r-- | libass/ass_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_cache.c b/libass/ass_cache.c index 8a18e0a..ece9a17 100644 --- a/libass/ass_cache.c +++ b/libass/ass_cache.c @@ -244,7 +244,7 @@ void *ass_cache_put(Cache *cache, void *key, void *value) unsigned bucket = cache->hash_func(key, cache->key_size) % cache->buckets; CacheItem **item = &cache->map[bucket]; while (*item) - *item = (*item)->next; + item = &(*item)->next; (*item) = calloc(1, sizeof(CacheItem)); (*item)->key = malloc(cache->key_size); (*item)->value = malloc(cache->value_size); |