From: Jaroslav Kysela Date: Wed, 26 Dec 2018 13:26:12 +0000 (+0100) Subject: imagecache: fix the missing ref initialization, fixes #5458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=112e06dfdc0a713e97a040eb7c443a31fb2ac46e;p=thirdparty%2Ftvheadend.git imagecache: fix the missing ref initialization, fixes #5458 --- diff --git a/src/imagecache.c b/src/imagecache.c index 38c84b2c4..b183bbdb2 100644 --- a/src/imagecache.c +++ b/src/imagecache.c @@ -450,6 +450,7 @@ retry: } if (img->savepend) { img->state = SAVE; + imagecache_decref(img); goto retry; } img->state = IDLE; @@ -504,6 +505,7 @@ imagecache_init ( void ) if (!(url = htsmsg_get_str(e, "url"))) continue; img = calloc(1, sizeof(imagecache_image_t)); img->id = id; + img->ref = 1; img->url = strdup(url); img->accessed = htsmsg_get_s64_or_default(e, "accessed", 0); img->updated = htsmsg_get_s64_or_default(e, "updated", 0);