Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
fix memory leak in evthr_free when compiled with EVHTP_THR_SHARED_PIPE
Browse files Browse the repository at this point in the history
Signed-off-by: t00416110 <tanyifeng1@huawei.com>
  • Loading branch information
t00416110 committed Jul 9, 2018
1 parent 8570e09 commit 919e4ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ evthr_free(evthr_t * thread) {
event_free(thread->event);
}

#ifdef EVTHR_SHARED_PIPE
if (thread->shared_pool_ev) {
event_free(thread->shared_pool_ev);
}
#endif

if (thread->evbase) {
event_base_free(thread->evbase);
}
Expand Down

0 comments on commit 919e4ea

Please sign in to comment.