Skip to content

Commit

Permalink
Fix a small memory leak
Browse files Browse the repository at this point in the history
Fix a small memory leak when failing to spawn a new thread.
  • Loading branch information
mbgrydeland authored and dridi committed Oct 25, 2019
1 parent 4f6e63f commit 263ffe6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/varnishd/cache/cache_wrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ pool_breed(struct pool *qp)
pi->qp = qp;

if (pthread_create(&tp, &tp_attr, pool_thread, pi)) {
FREE_OBJ(pi);
VSL(SLT_Debug, 0, "Create worker thread failed %d %s",
errno, vstrerror(errno));
Lck_Lock(&pool_mtx);
Expand Down

0 comments on commit 263ffe6

Please sign in to comment.