]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
imagecache: cleanup http client resources when finished 784/head
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 11 Jan 2016 20:02:24 +0000 (20:02 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 11 Jan 2016 20:07:00 +0000 (20:07 +0000)
src/imagecache.c

index f9a04faf23ce8341885026d95b88a230628a94f0..2ed82b6dd3c8c898d32b2e3e0241cad35d6f005d 100644 (file)
@@ -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;