Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: pointer used after ‘void operator delete` in callback-cpp-style.cpp #2805

Open
joachimmetz opened this issue Feb 11, 2023 · 2 comments

Comments

@joachimmetz
Copy link
Contributor

joachimmetz commented Feb 11, 2023

While building 7f94769

In file included from ../tsk/libtsk.h:15,
                 from callback-cpp-style.cpp:41:
In member function ‘void TskFsInfo::close()’,
    inlined from ‘uint8_t procFs(TskImgInfo*, TSK_OFF_T)’ at callback-cpp-style.cpp:196:23:
../tsk/fs/tsk_fs.h:2225:21: warning: pointer used after ‘void operator delete(void*, std::size_t)’ [-Wuse-after-free]
 2225 |         tsk_fs_close(m_fsInfo);
      |         ~~~~~~~~~~~~^~~~~~~~~~
callback-cpp-style.cpp: In function ‘uint8_t procFs(TskImgInfo*, TSK_OFF_T)’:
callback-cpp-style.cpp:194:16: note: call to ‘void operator delete(void*, std::size_t)’ here
  194 |         delete fs_info;
      |                ^~~~~~~
@joachimmetz
Copy link
Contributor Author

joachimmetz added a commit to joachimmetz/sleuthkit that referenced this issue Feb 11, 2023
@joachimmetz
Copy link
Contributor Author

Changes in #2806

APriestman added a commit that referenced this issue May 30, 2024
Fixes for use after free in callback-cpp-style.cpp #2805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant