Skip to content

Commit

Permalink
Fix memory leak.
Browse files Browse the repository at this point in the history
On reset(), delete m_callbaks if it exists.
  • Loading branch information
mstemm committed Feb 28, 2017
1 parent 91da239 commit 9e778ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions userspace/libsinsp/fdinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ template<> void sinsp_fdinfo_t::reset()
{
m_type = SCAP_FD_UNINITIALIZED;
m_flags = FLAGS_NONE;
delete(m_callbaks);
m_callbaks = NULL;
m_usrstate = NULL;
}
Expand Down

0 comments on commit 9e778ef

Please sign in to comment.