From 1c024df00b599fd2588f106c998dc82857788709 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Mon, 11 Jan 2016 20:02:24 +0000 Subject: [PATCH] imagecache: cleanup http client resources when finished --- src/imagecache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.2