Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
imagecache: cleanup http client resources when finished
  • Loading branch information
adamsutton committed Jan 11, 2016
1 parent 97b26a9 commit 1c024df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imagecache.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1c024df

Please sign in to comment.