}
imagecache_destroy(img, 0);
}
- tvh_mutex_unlock(&imagecache_lock);
SKEL_FREE(imagecache_skel);
+ tvh_mutex_unlock(&imagecache_lock);
}
if (!imagecache_conf.enabled && strncasecmp(url, "file://", 7))
return 0;
+ tvh_mutex_lock(&imagecache_lock);
+
/* Skeleton */
SKEL_ALLOC(imagecache_skel);
imagecache_skel->url = url;
- tvh_mutex_lock(&imagecache_lock);
-
/* Create/Find */
i = RB_INSERT_SORTED(&imagecache_by_url, imagecache_skel, url_link, url_cmp);
if (!i) {