From: Adam Sutton Date: Mon, 11 Jan 2016 20:02:24 +0000 (+0000) Subject: imagecache: cleanup http client resources when finished X-Git-Tag: v4.2.1~1163^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F784%2Fhead;p=thirdparty%2Ftvheadend.git imagecache: cleanup http client resources when finished --- diff --git a/src/imagecache.c b/src/imagecache.c index f9a04faf2..2ed82b6dd 100644 --- a/src/imagecache.c +++ b/src/imagecache.c @@ -252,7 +252,7 @@ imagecache_image_fetch ( imagecache_image_t *img ) char tpath[PATH_MAX] = "", path[PATH_MAX]; tvhpoll_event_t ev; tvhpoll_t *efd = NULL; - http_client_t *hc; + http_client_t *hc = NULL; lock_assert(&global_lock); @@ -316,6 +316,7 @@ imagecache_image_fetch ( imagecache_image_t *img ) error_lock: pthread_mutex_lock(&global_lock); error: + if (NULL != hc) http_client_close(hc); urlreset(&url); tvhpoll_destroy(efd); img->state = IDLE;