Skip to content

Commit

Permalink
Merge pull request #2806 from joachimmetz/usefree2
Browse files Browse the repository at this point in the history
Fixes for use after free in callback-cpp-style.cpp #2805
  • Loading branch information
APriestman committed May 30, 2024
2 parents 82931cd + ee0d4b6 commit 02c226a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion samples/callback-cpp-style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ procFs(TskImgInfo * img_info, TSK_OFF_T start)
if (fs_info->dirWalk(fs_info->getRootINum(),
(TSK_FS_DIR_WALK_FLAG_ENUM) (TSK_FS_DIR_WALK_FLAG_RECURSE),
dirAct, NULL)) {
delete fs_info;
tsk_error_print(stderr);
fs_info->close();
// Free fs_info after close
delete fs_info;
return 1;
}

Expand Down

0 comments on commit 02c226a

Please sign in to comment.